Skip to content

refine build files

refine build files #1

Workflow file for this run

name: Publish to NPM
on: [push, pull_request, workflow_dispatch]
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'