Skip to content

Commit

Permalink
ci: added automated npm release
Browse files Browse the repository at this point in the history
  • Loading branch information
SachsenspieltCoding committed Jan 2, 2024
1 parent c64b5e1 commit 591db95
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build and Release

on:
release:
types:
- published

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: Build app
run: npm run build

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build
path: .

release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: build
path: .

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 20

- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLSH_KEY}}

0 comments on commit 591db95

Please sign in to comment.