From 72021d2b81aaae07b259ea0e98f398712d5fc8c9 Mon Sep 17 00:00:00 2001 From: simonireilly Date: Thu, 9 Jun 2022 21:08:59 +0100 Subject: [PATCH] Seperate workflows for separate concerns --- .github/workflows/beta.yml | 25 +++++++++++++++++++++++++ .github/workflows/latest.yml | 25 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .github/workflows/beta.yml create mode 100644 .github/workflows/latest.yml diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml new file mode 100644 index 0000000..404bf70 --- /dev/null +++ b/.github/workflows/beta.yml @@ -0,0 +1,25 @@ +name: Node.js Package + +on: + release: + types: [prereleased] + +jobs: + publish-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://registry.npmjs.org/ + cache: "yarn" + + - run: yarn + + - run: yarn build + + - run: npm publish --tag beta + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml new file mode 100644 index 0000000..34de52c --- /dev/null +++ b/.github/workflows/latest.yml @@ -0,0 +1,25 @@ +name: Node.js Package + +on: + release: + types: [released] + +jobs: + publish-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://registry.npmjs.org/ + cache: "yarn" + + - run: yarn + + - run: yarn build + + - run: npm publish --tag latest + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}