Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
# cspell:words akarshtechsuite
name: release
on:
push:
branches: [main]
# The workflow token only reads. Every write (the Release commit, the v* tag,
# the GitHub release and its comments) uses a token minted from the release
# GitHub App, which is the one actor allowed to push to protected main and to
# create v* tags.
permissions:
contents: write # commit the version bump + tag, push, create the release
contents: read
id-token: write # npm OIDC trusted publishing + provenance
issues: write
pull-requests: write
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.RELEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history + tags for version analysis
# The checkout's saved credentials are what `git push` uses, so they
# must be the App's, not the workflow token's.
token: ${{ steps.app-token.outputs.token }}
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
Expand All @@ -25,10 +36,9 @@ jobs:
- run: pnpm install --frozen-lockfile
- run: pnpm exec semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# The release commit is authored and committed by whoever made the commit that
# triggered this release (the merge or push to main), not a fixed identity.
GIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
GIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
GIT_COMMITTER_NAME: ${{ github.event.head_commit.author.name }}
GIT_COMMITTER_EMAIL: ${{ github.event.head_commit.author.email }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
# Author + committer for the generated release commit.
GIT_AUTHOR_NAME: akarshtechsuite
GIT_AUTHOR_EMAIL: akarsh@techsuite.io
GIT_COMMITTER_NAME: akarshtechsuite
GIT_COMMITTER_EMAIL: akarsh@techsuite.io
Loading