Skip to content

publish-to-npm

publish-to-npm #1

Workflow file for this run

name: "publish-to-npm"
on:
release:
types: ["created"]
workflow_dispatch:
permissions: {}
jobs:
build:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
with:
submodules: "recursive"
- name: "Install task"
run: "npm install --global @go-task/cli"
- run: "task package"
- name: "Upload build artifacts"
uses: "actions/upload-artifact@v4"
with:
path: "dist/"
if-no-files-found: "error"
retention-days: 1
publish-to-npm:
needs: ["build"]
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "actions/download-artifact@v4"
- uses: "actions/setup-node@v4"
with:
node-version: 22
registry-url: "https://registry.npmjs.org/"
- run: "npm publish"
env:
NODE_AUTH_TOKEN: "${{secrets.NPM_TOKEN}}"