Skip to content

Release (branch: main) #20

Release (branch: main)

Release (branch: main) #20

Workflow file for this run

name: Release
run-name: "Release (branch: ${{ github.event.workflow_run.head_branch }})"
on:
workflow_run:
workflows: [Tests]
types: [completed]
branches: [main]
permissions:
contents: read
concurrency:
group: release
jobs:
release:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.workflow_run.head_branch }}
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- uses: actions/cache/restore@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
- run: npm run build
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: npm run release