From bcc0faf9332437230ba15049142aa24a44d293c3 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Wed, 7 Dec 2022 16:04:59 -0800 Subject: [PATCH] ci: add automated npm publish on release --- .github/workflows/npm-release.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/npm-release.yaml diff --git a/.github/workflows/npm-release.yaml b/.github/workflows/npm-release.yaml new file mode 100644 index 0000000..ef8eff1 --- /dev/null +++ b/.github/workflows/npm-release.yaml @@ -0,0 +1,25 @@ +name: Publish Package to npmjs +on: + release: + types: [published] + +jobs: + build-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + cache: 'yarn' + + - name: Yarn Install + run: yarn install --frozen-lockfile + + - name: Yarn Build + run: yarn run build + + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}