From d93db33b66a25221971fa10ce7c6adc74a6c39f9 Mon Sep 17 00:00:00 2001 From: Aidan McPhelim Date: Thu, 23 Nov 2023 10:28:11 +0000 Subject: [PATCH 1/2] created a release action --- .github/workflows/release.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 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..a5d83f1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: Release + +on: + push: + branches: [ main ] + workflow_dispatch: + +jobs: + build: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20.x' + + - name: Install node modules and verify build + run: npm install && npm run build-release + + - name: Lint and test + run: npm run lint && npm run test + + - name: Publish + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} \ No newline at end of file From 29cb4f4fd1ec4b15d50d3db10ebac89b5e86b1d8 Mon Sep 17 00:00:00 2001 From: Aidan McPhelim Date: Thu, 23 Nov 2023 10:50:52 +0000 Subject: [PATCH 2/2] release action to trigger on GH release publish --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a5d83f1..14246a7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,8 @@ name: Release on: - push: - branches: [ main ] + release: + types: [ published ] workflow_dispatch: jobs: