Add .forgejo/workflows/publish.yml
This commit is contained in:
parent
1fa6d558c7
commit
d53b34b1f8
1 changed files with 31 additions and 0 deletions
31
.forgejo/workflows/publish.yml
Normal file
31
.forgejo/workflows/publish.yml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
name: Publish to npm
|
||||
|
||||
# Der Trigger: Führe dies NUR aus, wenn ein neues Release veröffentlicht wird
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
publish-npm:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Code auschecken
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Node.js Umgebung aufsetzen
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '24' # Passt für moderne JS/TS Projekte
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Abhängigkeiten installieren
|
||||
run: npm ci
|
||||
|
||||
# Optional: Falls du einen Build-Step hast (z.B. TypeScript zu JS kompilieren)
|
||||
# - name: Projekt bauen
|
||||
# run: npm run build
|
||||
|
||||
- name: Paket veröffentlichen
|
||||
run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue