Skip to content

refactor(errors): centralize 403 FORBIDDEN translation in wrapResult … #11

refactor(errors): centralize 403 FORBIDDEN translation in wrapResult …

refactor(errors): centralize 403 FORBIDDEN translation in wrapResult … #11

Workflow file for this run

name: Release
on:
push:
branches:
- main
- next
permissions:
# Enable `semantic-release` to publish a GitHub release and push commits
contents: write
# Enable `semantic-release` to post comments on issues
issues: write
# Enable `semantic-release` to post comments on pull requests
pull-requests: write
# Enable the use of OIDC for trusted publishing and npm provenance
id-token: write
# Release involves crucial steps that shouldn't be cancelled mid-run,
# so new workflow runs are queued until the previous one finishes.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
name: Release
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Generate bot token
id: generate_token
uses: actions/create-github-app-token@v3
with:
app-id: ${{ secrets.DOIST_RELEASE_BOT_ID }}
private-key: ${{ secrets.DOIST_RELEASE_BOT_PRIVATE_KEY }}
permission-contents: write
permission-issues: write
permission-pull-requests: write
- name: Get bot user ID
id: bot_user
run: |
user_id=$(gh api "/users/${{ steps.generate_token.outputs.app-slug }}[bot]" --jq .id)
if [ -z "$user_id" ]; then
echo "Failed to get bot user ID" >&2
exit 1
fi
echo "id=$user_id" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ steps.generate_token.outputs.token }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
scope: '@doist'
registry-url: 'https://registry.npmjs.org/'
- name: Install dependencies
run: npm ci
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
GIT_AUTHOR_NAME: ${{ steps.generate_token.outputs.app-slug }}[bot]
GIT_AUTHOR_EMAIL: ${{ steps.bot_user.outputs.id }}+${{ steps.generate_token.outputs.app-slug }}[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: ${{ steps.generate_token.outputs.app-slug }}[bot]
GIT_COMMITTER_EMAIL: ${{ steps.bot_user.outputs.id }}+${{ steps.generate_token.outputs.app-slug }}[bot]@users.noreply.github.com