Merge pull request #46 from ioaiaaii/chore/resources_and_resume #29
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Trigger on tags starting with 'v' | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| actions: write | |
| packages: write | |
| id-token: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch the entire history | |
| submodules: true # Fetch all submodules | |
| - name: Run Makefile Target and Capture Output | |
| id: generate_changelog | |
| env: | |
| TAG: ${{ github.ref_name }} # Set the tag for the Makefile | |
| run: | | |
| # Run the Makefile target with the specified TAG and capture output | |
| changelog=$(make conventional-changelog-release TAG=$TAG) | |
| echo "changelog<<EOF" >> $GITHUB_OUTPUT | |
| echo "$changelog" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - name: Create GitHub Release | |
| uses: actions/github-script@v6 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CHANGELOG: ${{ steps.generate_changelog.outputs.changelog }} | |
| with: | |
| script: | | |
| const tag = process.env.GITHUB_REF_NAME; | |
| const changelog = process.env.CHANGELOG; | |
| await github.rest.repos.createRelease({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| tag_name: tag, | |
| name: `${tag}`, | |
| body: changelog, | |
| draft: false, | |
| prerelease: false | |
| }); | |
| package: | |
| name: Package and Push Docker Image | |
| uses: ./.github/workflows/package.yaml | |
| secrets: | |
| provider_name: ${{ secrets.PROVIDER_NAME }} | |
| service_account_email: ${{ secrets.SA_EMAIL }} |