Files
actions-toolkit/.github/workflows/publish.yml
2025-12-18 12:05:50 +01:00

53 lines
1.0 KiB
YAML

name: publish
permissions:
id-token: write # required for OIDC
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
tags:
- 'v*'
env:
NODE_VERSION: "24" # at least Node 24 is required for Trusted Publishing with OIDC
jobs:
publish:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v6
-
name: Enable corepack
run: |
corepack enable
yarn --version
-
name: Setup Node
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
-
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 --access public