Add CodeIgniter\Config\ to additional config namespaces #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- '**' | |
env: | |
COMPOSER_ROOT_VERSION: '1.x-dev' | |
DEFAULT_BRANCH: '1.x' | |
TARGET_PHP_VERSION: '7.4' | |
TARGET_PHP_VERSION_ID: 70400 | |
jobs: | |
build: | |
name: Create a release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Create release | |
uses: crazy-max/ghaction-github-release@v2 | |
with: | |
token: ${{ secrets.RELEASE_TOKEN }} | |
draft: true | |
prerelease: false | |
build_downgraded_release: | |
name: Build release for lower PHP version | |
runs-on: ubuntu-latest | |
needs: build | |
timeout-minutes: 10 | |
permissions: | |
# Give the default GITHUB_TOKEN write permission to commit and push the | |
# added or changed files to the repository. | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP 8.1 | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
coverage: none | |
env: | |
COMPOSER_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
- name: Get branch name | |
id: branch_name | |
run: echo "BRANCH=build-downgrade-to-${{ env.TARGET_PHP_VERSION_ID }}" >> $GITHUB_OUTPUT | |
- name: Install dependencies | |
run: composer update --ansi | |
- name: Downgrade src | |
run: php bin/transform-source ${{ env.TARGET_PHP_VERSION_ID }} | |
- name: Setup PHP ${{ env.TARGET_PHP_VERSION }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ env.TARGET_PHP_VERSION }} | |
coverage: none | |
env: | |
COMPOSER_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
- name: Get tag for downgraded release | |
id: tag-downgraded | |
run: echo "${{ format('DOWNGRADED_TAG={0}.{1}', github.ref_name, env.TARGET_PHP_VERSION_ID) }}" >> $GITHUB_OUTPUT | |
- name: Import GPG signing information | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.PASSPHRASE }} | |
git_config_global: true | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
git_tag_gpgsign: true | |
- name: Commit and tag | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
with: | |
commit_message: 'Release PHPStan CodeIgniter to target PHP ${{ env.TARGET_PHP_VERSION }}' | |
branch: ${{ steps.branch_name.outputs.BRANCH }} | |
tagging_message: ${{ steps.tag-downgraded.outputs.DOWNGRADED_TAG }} | |
commit_options: '--gpg-sign' | |
commit_user_name: paulbalandan | |
commit_user_email: paulbalandan@gmail.com | |
add_options: '-u' | |
create_branch: true | |
- name: Delete local and remote branches | |
run: | | |
git switch ${{ env.DEFAULT_BRANCH }} | |
git branch -D ${{ steps.branch_name.outputs.BRANCH }} | |
git push origin -d ${{ steps.branch_name.outputs.BRANCH }} | |
git branch -a |