Scheduled Handler support (#104) #32
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: Publish New Version Tag | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'terrable_build' | |
| jobs: | |
| update-version-and-tag: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Generate GitHub App token | |
| id: generate_token | |
| uses: tibdex/github-app-token@v2 | |
| with: | |
| app_id: ${{ secrets.ACTIONS_APP_ID }} | |
| private_key: ${{ secrets.ACTIONS_APP_PRIVATE_KEY }} | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ steps.generate_token.outputs.token }} | |
| - name: Read version from file | |
| id: version | |
| run: | | |
| VERSION=$(grep -oP 'version\s*=\s*\K[\d.]+' terrable_build) | |
| echo "::set-output name=version::$VERSION" | |
| - name: Create and push tag | |
| env: | |
| GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} | |
| run: | | |
| git config user.name goreleaserbot | |
| git config user.email bot@goreleaser.com | |
| git tag -a v${{ steps.version.outputs.version }} -m "Version ${{ steps.version.outputs.version }}" | |
| git push https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git v${{ steps.version.outputs.version }} | |