Files
simapi-vue/.github/workflows/publish.yml
T
xrain 29d3705073
Publish to npm / publish (push) Failing after 11s
fix ci
2026-04-08 01:52:19 +08:00

39 lines
803 B
YAML

name: Publish to npm
on:
push:
tags:
- "*"
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- name: Replace version placeholder
run: |
VERSION="${GITHUB_REF#refs/tags/}"
echo "Publishing version: $VERSION"
# Update package.json
npm pkg set version=$VERSION
- name: Install dependencies
run: npm ci
- name: Build
env:
SimApiVersion: ${{ github.ref_name }}
run: npm run build
- name: Publish to npm
run: npm publish --access public