Skip to content

Commit

Permalink
add release
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed May 31, 2023
1 parent d962a72 commit 3bdb923
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
19 changes: 1 addition & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
name: CI

on: push

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -16,16 +11,4 @@ jobs:
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test --if-present

- name: Release
if: startsWith(github.ref, 'refs/tags/')
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
uses: softprops/action-gh-release@v1
with:
files: |
*-x64
*-arm64
*-x64.exe
- run: npm test --if-present
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 3bdb923

Please sign in to comment.