Tag Engine Release #2
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: Tag Engine Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| type: choice | |
| description: Release bump | |
| required: true | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| env: | |
| CI: true | |
| WORKING_DIRECTORY: '.' | |
| concurrency: | |
| group: ${{github.workflow}}-${{github.head_ref}} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| jobs: | |
| tag-release: | |
| name: Create a new release | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| # with: | |
| # token: ${{ secrets.GH_TOKEN_WORKFLOW_PUBLISH }} | |
| - name: git config | |
| run: | | |
| git config user.name "${GITHUB_ACTOR}" | |
| git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
| - uses: ./.github/actions/node | |
| with: | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - run: pnpm i --frozen-lockfile --ignore-scripts | |
| - name: tag and prepare release | |
| id: tag | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| pnpm release-it "${{ github.event.inputs.version }}" --ci -V | |
| RELEASE_VERSION=$(cat package.json | jq -r '.version') | |
| echo "release_version=${RELEASE_VERSION}" >> $GITHUB_OUTPUT | |
| - name: Dispatch engine release workflow | |
| uses: peter-evans/repository-dispatch@v2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| repository: bff-backup/code | |
| event-type: release-engine | |
| client-payload: '{"ref": "v${{ steps.tag.outputs.release_version }}"}' |