-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): Implemented publish workflow
- Loading branch information
Showing
2 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Release | ||
'on': | ||
push: | ||
branches: | ||
- master | ||
- next | ||
- beta | ||
- '*.x' | ||
permissions: | ||
contents: read # for checkout | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
id-token: write # to enable use of OIDC for npm provenance | ||
name: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.OBLAKBOT_PAT }} | ||
- name: Import GPG key | ||
uses: crazy-max/ghaction-import-gpg@v6 | ||
id: gpg | ||
with: | ||
gpg_private_key: ${{ secrets.OBLAKBOT_GPG_KEY }} | ||
passphrase: ${{ secrets.OBLAKBOT_GPG_PASS }} | ||
git_config_global: true | ||
git_user_signingkey: true | ||
git_commit_gpgsign: true | ||
- uses: actions/setup-node@v4 | ||
with: | ||
cache: npm | ||
node-version: lts/* | ||
- run: npm clean-install | ||
- run: npm audit signatures | ||
- name: Build | ||
run: npm run build | ||
- name: Publish NPM package | ||
uses: cycjimmy/semantic-release-action@v4 | ||
with: | ||
extra_plugins: | | ||
@semantic-release/github | ||
env: | ||
GIT_AUTHOR_NAME: ${{ steps.gpg.outputs.name}} | ||
GIT_AUTHOR_EMAIL: ${{ steps.gpg.outputs.email}} | ||
GIT_COMMITTER_NAME: ${{ steps.gpg.outputs.name}} | ||
GIT_COMMITTER_EMAIL: ${{ steps.gpg.outputs.email}} | ||
GITHUB_TOKEN: ${{ secrets.OBLAKBOT_PAT }} | ||
NPM_TOKEN: ${{ secrets.OBLAKBOT_NPM_TOKEN }} |
This file contains 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