Skip to content

Update npm-publish.yml with permissions (#45) #22

Update npm-publish.yml with permissions (#45)

Update npm-publish.yml with permissions (#45) #22

Workflow file for this run

# Release workflow powered by semantic-release.
# Only publishes when conventional commits since last release warrant a release.
name: Release
on:
push:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: read
jobs:
release:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Enable Corepack (Yarn 4)
run: corepack enable
- run: yarn install --immutable
- run: yarn tsc
- run: yarn build
- name: Run semantic-release
run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}