Add Trusted Publishing (#307)

This commit is contained in:
dai 2026-02-19 23:25:46 +01:00 committed by GitHub
parent 6552a5d2d1
commit 29c93e5b0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 19 deletions

View file

@ -1,17 +0,0 @@
name: publish-npm
on:
push:
branches: [main]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20"
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}

View file

@ -4,6 +4,10 @@ on:
push:
tags: ["v*", "workflow_dispatch"]
permissions:
id-token: write
contents: read
jobs:
build:
name: Build
@ -53,8 +57,8 @@ jobs:
files: |
jecs.rbxm
publish:
name: Publish
publish-wally:
name: Publish to Wally
needs: [release]
runs-on: ubuntu-latest
steps:
@ -69,3 +73,20 @@ jobs:
- name: Publish
run: wally publish
publish-npm:
name: Publish to NPM
needs: [release]
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- run: npm install
- run: npm publish