From 829b46637fda52a5fe58e76223cb825c12def0b4 Mon Sep 17 00:00:00 2001 From: Keiichiro Amemiya Date: Thu, 26 Dec 2024 22:48:09 +0100 Subject: [PATCH] ci: setup canary release (#114) --- .github/workflows/ci.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 181ffdf..354ee3a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,9 +14,9 @@ jobs: strategy: matrix: node-version: - - '18' - - '20' - - '22' + - "18" + - "20" + - "22" steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -29,3 +29,18 @@ jobs: - uses: codecov/codecov-action@v3 if: matrix.node-version == '22' - run: npm run build + + canary-publish: + if: github.event_name == 'push' && github.ref_name == 'main' + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "22" + - run: npm ci + - run: npm run build + - run: | + npm version 0.0.0-canary.${{ github.sha }} + npm publish --tag canary