Files
actions-toolkit/.github/workflows/publish.yml
2026-03-27 10:43:15 +01:00

56 lines
1.1 KiB
YAML

name: publish
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
on:
push:
tags:
- 'v*'
env:
NODE_VERSION: "24"
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # required for OIDC
steps:
-
name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
-
name: Enable corepack
run: |
corepack enable
yarn --version
-
name: Setup Node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
package-manager-cache: false
-
name: Print versions
run: |
node --version
npm --version
yarn --version
-
name: Build
run: |
yarn install
yarn run build
-
name: Publish
run: |
npm version --no-git-tag-version ${GITHUB_REF#refs/tags/v}
npm publish --provenance --access public