From 75433e316e8fb23f8e0a40b2b0ea97dacbaba103 Mon Sep 17 00:00:00 2001 From: Jacky Liang Date: Sat, 17 Feb 2024 14:35:51 -0500 Subject: [PATCH] Create "publish-to-npm" workflow --- .github/workflows/publish-to-npm.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/publish-to-npm.yml diff --git a/.github/workflows/publish-to-npm.yml b/.github/workflows/publish-to-npm.yml new file mode 100644 index 0000000..e1c3a45 --- /dev/null +++ b/.github/workflows/publish-to-npm.yml @@ -0,0 +1,24 @@ +name: "Publish to npm" + +run-name: "Publishing ${{ github.event.release.tag_name }} to npm" + +on: + release: + types: ["published"] + +permissions: + {} + +jobs: + publish-to-npm: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v4" + - uses: "actions/setup-node@v4" + with: + node-version-file: "package.json" + registry-url: "https://registry.npmjs.org" + - run: npm install + - run: npm publish + env: + NODE_AUTH_TOKEN: "${{ secrets.NODE_AUTH_TOKEN }}"