-
-
Notifications
You must be signed in to change notification settings - Fork 107
38 lines (36 loc) · 1.06 KB
/
npm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Publish to NPM
on:
workflow_dispatch:
release:
types: [published]
jobs:
build_cli:
name: Build and Publish to NPM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm i -f
- name: Create env file
run: |
touch .env
echo SENTRY_ENABLED=1 >> .env
echo SENTRY_DSN=${{ secrets.SENTRY_DSN }} >> .env
- name: Build
run: npm pack
- name: NPM Publish
if: startsWith(github.ref, 'refs/tags/v')
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_ACCESS_TOKEN }}
## - uses: Saionaro/[email protected]
## id: package-version
## - name: Upload Artifact
## uses: actions/upload-artifact@v2
## with:
## name: 'TallyArbiter-${{ steps.package-version.outputs.version }}'
## path: 'TallyArbiter-${{ steps.package-version.outputs.version }}.tgz'