build(deps-dev): Bump the vitest group with 3 updates #22
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
| # Release | |
| # | |
| # Publish a GitHub release on release branch merge. | |
| # | |
| # References: | |
| # | |
| # - https://cli.github.com/manual/gh_release_create | |
| # - https://docs.github.com/actions/learn-github-actions/contexts | |
| # - https://docs.github.com/actions/learn-github-actions/expressions | |
| # - https://docs.github.com/actions/reference/workflows-and-actions/workflow-commands | |
| # - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#pull_request | |
| # - https://docs.github.com/actions/using-workflows/using-github-cli-in-workflows | |
| # - https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions | |
| # - https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request | |
| # - https://git-scm.com/book/en/v2/Git-Basics-Tagging | |
| # - https://github.com/actions/checkout | |
| # - https://github.com/crazy-max/ghaction-import-gpg | |
| # - https://github.com/flex-development/dist-tag-action | |
| # - https://github.com/flex-development/gh-release-url-action | |
| # - https://github.com/flex-development/grease | |
| # - https://github.com/flex-development/jq-action | |
| # - https://github.com/flex-development/manver-action | |
| # - https://github.com/hmarr/debug-action | |
| # - https://yarnpkg.com/cli/pack | |
| --- | |
| name: release | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| types: | |
| - closed | |
| env: | |
| ref_name: ${{ format('{0}@{1}', github.base_ref, github.event.pull_request.merge_commit_sha) }} | |
| jobs: | |
| preflight: | |
| if: ${{ startsWith(github.head_ref, 'release/') && github.event.pull_request.merged }} | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| outputs: | |
| prerelease: ${{ steps.dist.outputs.prerelease }} | |
| tag: ${{ steps.version.outputs.tag }} | |
| version: ${{ steps.version.outputs.manifest }} | |
| url: ${{ steps.environment.outputs.url }} | |
| steps: | |
| - id: debug | |
| name: Print environment variables and event payload | |
| uses: hmarr/[email protected] | |
| - id: checkout | |
| name: Checkout ${{ env.ref_name }} | |
| uses: actions/[email protected] | |
| with: | |
| ref: ${{ github.event.pull_request.merge_commit_sha }} | |
| - id: tag-prefix | |
| name: Get release tag prefix | |
| uses: flex-development/[email protected] | |
| with: | |
| data: grease.config.json | |
| filter: .tagprefix | |
| - id: version | |
| name: Get release version | |
| uses: flex-development/[email protected] | |
| with: | |
| tag-prefix: ${{ steps.tag-prefix.outputs.result }} | |
| - id: environment | |
| name: Get release url | |
| uses: flex-development/[email protected] | |
| with: | |
| version: ${{ steps.version.outputs.tag }} | |
| - id: dist | |
| name: Get dist tag | |
| uses: flex-development/[email protected] | |
| with: | |
| target: ${{ steps.version.outputs.manifest }} | |
| publish: | |
| needs: preflight | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: release | |
| url: ${{ needs.preflight.outputs.url }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_REPO_TOKEN }} | |
| HUSKY: 0 | |
| NOTES_FILE: RELEASE_NOTES.md | |
| steps: | |
| - id: checkout | |
| name: Checkout ${{ env.ref_name }} | |
| uses: actions/[email protected] | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: true | |
| ref: ${{ github.event.pull_request.merge_commit_sha }} | |
| token: ${{ env.GITHUB_TOKEN }} | |
| - id: gpg-import | |
| name: Import GPG key | |
| uses: crazy-max/[email protected] | |
| with: | |
| git_config_global: true | |
| git_push_gpgsign: false | |
| git_tag_gpgsign: true | |
| git_user_signingkey: true | |
| gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| trust_level: 5 | |
| - id: node | |
| name: Setup Node.js | |
| uses: actions/[email protected] | |
| with: | |
| cache: yarn | |
| cache-dependency-path: yarn.lock | |
| node-version-file: .nvmrc | |
| - id: yarn | |
| name: Install dependencies | |
| run: yarn --no-immutable && echo "$GITHUB_WORKSPACE/node_modules/.bin" >>$GITHUB_PATH | |
| - id: pack | |
| name: Pack project | |
| run: yarn pack -o %s-%v.tgz | |
| - id: release-notes | |
| name: Generate release notes | |
| env: | |
| TZ: ${{ vars.TZ }} | |
| run: grease changelog -wo $NOTES_FILE && echo "$(cat $NOTES_FILE)" >>$GITHUB_STEP_SUMMARY | |
| - id: tag | |
| name: Create annotated tag | |
| run: 'grease tag -ps -m "release: {tag}" ${{ needs.preflight.outputs.version }}' | |
| - id: publish | |
| name: Publish release | |
| run: | | |
| gh release create ${{ needs.preflight.outputs.tag }} *.tgz --title=${{ needs.preflight.outputs.tag }} --notes-file=$NOTES_FILE --verify-tag --prerelease=${{ needs.preflight.outputs.prerelease }} --discussion-category=releases |