aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/publish.yml (renamed from .gitea/workflows/publish.yml)21
1 files changed, 9 insertions, 12 deletions
diff --git a/.gitea/workflows/publish.yml b/.github/workflows/publish.yml
index a03cd97..fa7cf26 100644
--- a/.gitea/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -5,15 +5,19 @@ on:
tags:
- "v*"
+permissions:
+ contents: read
+ id-token: write
+
jobs:
test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v6
+ uses: actions/checkout@v4
- name: Setup Node
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
@@ -45,14 +49,14 @@ jobs:
run: npm run test:integration
publish:
- name: Publish to NPM
+ name: Publish to NPM (Trusted Publisher)
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
- uses: actions/checkout@v6
+ uses: actions/checkout@v4
- name: Setup Node
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org/
@@ -60,16 +64,9 @@ jobs:
cache-dependency-path: package-lock.json
- name: Install deps
run: npm ci
- - name: Clean build artifacts
- run: rm -rf dist
- name: Build plugin
run: npm run build
- name: Verify plugin
run: npm run verify
- - name: Clean workspace for publish
- run: |
- rm -rf playground tests admin server node_modules .gitea .github
- name: Publish
run: npm publish
- env:
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}