Update release manifest and bump patch #9
This file contains hidden or 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: Update release manifest and bump patch | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| track: | |
| description: 'Track to record in the manifest' | |
| required: true | |
| default: 'production' | |
| type: choice | |
| options: | |
| - internal | |
| - alpha | |
| - beta | |
| - production | |
| force_bump: | |
| description: 'Force patch version bump regardless of track changes' | |
| required: false | |
| default: false | |
| type: boolean | |
| jobs: | |
| release: | |
| name: Update manifest and bump patch | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@master | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| ref: "code/cash" | |
| - name: Decode Service Account Key JSON file | |
| uses: timheuer/base64-to-file@v1 | |
| id: service_account_json_file | |
| with: | |
| fileName: serviceAccount.json | |
| encodedString: ${{ secrets.FLIPCASH_SERVICE_ACCOUNT_KEY_JSON }} | |
| - name: Update release manifest | |
| id: manifest | |
| env: | |
| SERVICE_ACCOUNT_KEY_JSON: ${{ steps.service_account_json_file.outputs.filePath }} | |
| TRACKS: ${{ github.event.inputs.track }} | |
| FORCE_BUMP: ${{ github.event.inputs.force_bump }} | |
| run: bash scripts/update-release-manifest.sh | |
| - name: Commit & Push changes | |
| if: steps.manifest.outputs.prod_changed == 'true' || steps.manifest.outputs.forced == 'true' | |
| uses: actions-js/push@master | |
| with: | |
| message: >- | |
| ${{ steps.manifest.outputs.prod_changed == 'true' | |
| && format('build: release Flipcash {0} ({1}), bump to {2}', steps.manifest.outputs.new_prod_name, steps.manifest.outputs.new_prod, steps.manifest.outputs.version) | |
| || format('build: bump Flipcash to {0}', steps.manifest.outputs.version) }} | |
| branch: "code/cash" | |
| github_token: ${{ secrets.BOT_GITHUB_TOKEN }} |