Skip to content

Commit

Permalink
fix: update npm-publish
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephVoid committed Dec 17, 2023
1 parent 3c5ec83 commit 2f50345
Showing 1 changed file with 17 additions and 21 deletions.
38 changes: 17 additions & 21 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Release

on:
push:
branches:
- main

jobs:
build:
release:
name: Release
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Checkout
uses: actions/checkout@v2
with:
node-version: 18
- run: npm ci
- run: npm test
fetch-depth: 0

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npx semantic-release --branches main
node-version: "lts/*"

- name: Install dependencies
run: npm ci

- name: Release
env:
NODE_AUTH_TOKEN: ${{secrets.NPM}}
GITHUB_TOKEN: ${{ secrets.GA }}
NPM_TOKEN: ${{ secrets.NPM }}
run: npx semantic-release

0 comments on commit 2f50345

Please sign in to comment.