From 30b325f81fac5893acd1d0f97e519cc11e9b6c9e Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Tue, 7 Nov 2023 19:01:46 -0800 Subject: [PATCH] ci: add workflow to publish to npm --- .github/workflows/release.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..2593281403 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,20 @@ +on: + push: + tags: + - "v*" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Publish package + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + + # Currently, only npm supports publishing packages with provenance + # https://docs.npmjs.com/generating-provenance-statements + run: | + npm install + npm run build:docs & npm run build:lib + npm publish --provenance --access public