From 48bff18533375c0f8f2df38472bb29dbd42c0332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filiph=20Siitam=20Sandstr=C3=B6m?= Date: Sat, 21 Oct 2023 05:24:11 +0200 Subject: [PATCH] CI: Add the `release.yml` workflow to automate releases. --- .github/workflows/release.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 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..aa19484 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +name: Release + +on: + push: + branches: [master] + +jobs: + release: + name: Release + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 18.x + + - name: Install dependencies + run: npx ci + + - name: Install semantic-release extra plugins + run: npm install --save-dev @semantic-release/changelog @semantic-release/git + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx semantic-release