From 7747de6e188901d4008418eafd4798b730993a91 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Wed, 25 Sep 2024 00:40:23 +0900 Subject: [PATCH] Automate npm publish --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 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 0000000..7e785fe --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +# author: elliot-huffman +name: release +on: + release: + types: [created] +jobs: + publish: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: none + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20.x + registry-url: https://registry.npmjs.org/ + - name: Install dependencies + run: npm install + - name: Build + run: npm run build + - name: Test + run: npm test + - name: Publish to npm + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH }} \ No newline at end of file