Files
simapi-vue/.github/workflows/publish.yml
T
xrain c100973590
Publish to npm / publish (push) Failing after 2m22s
fix ci
2026-03-31 06:51:46 +08:00

40 lines
804 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: Get version from tag
id: version
run: |
VERSION="${GITHUB_REF#refs/tags/}"
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Update package.json version
run: npm pkg set version=${{ steps.version.outputs.version }}
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Publish to npm
run: npm publish --access public