From cd518e45b79cbe9c03e30ecc7eb6d5b7b8127b5b Mon Sep 17 00:00:00 2001 From: Patrick Cate Date: Sat, 20 Apr 2024 15:20:54 -0400 Subject: [PATCH] ci: add semantic release CI github action --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 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..95dad59 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Release + +on: + workflow_dispatch: + push: + branches: + - main + - alpha + - beta + +jobs: + release: + if: contains(github.event.head_commit.message, 'skip release') == false + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.SEMANTIC_RELEASE_GH_TOKEN }} + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Install dependencies + run: npm ci + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GH_TOKEN }} + NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} + run: npm run semantic-release