From cdc42d0449564cf385c992f7b194530899b720c4 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 16 May 2023 09:52:24 +0100 Subject: [PATCH] ci: release edge versions of labelled prs --- .github/workflows/ci.yml | 49 +++++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47f545dd65..54ed67e3d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -202,13 +202,7 @@ jobs: - lint - build - test-fixtures - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest] - node: [20] - + runs-on: ubuntu-latest timeout-minutes: 20 steps: @@ -218,7 +212,7 @@ jobs: - run: corepack enable - uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} + node-version: 20 cache: "pnpm" - name: Install dependencies @@ -235,3 +229,42 @@ jobs: env: NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} NPM_CONFIG_PROVENANCE: true + + release-pr: + permissions: + id-token: write + pull-requests: write + if: | + github.event_name == 'pull_request' && + contains(github.event.pull_request.labels.*.name, '🧷 edge release') + needs: + - lint + - build + - test-fixtures + runs-on: ubuntu-latest + timeout-minutes: 20 + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - run: corepack enable + - uses: actions/setup-node@v3 + with: + node-version: 20 + cache: "pnpm" + + - name: Install dependencies + run: pnpm install + + - name: Restore dist cache + uses: actions/download-artifact@v3 + with: + name: dist + path: packages + + - name: Release Edge + run: ./scripts/release-edge.sh pr-${{ github.event.issue.number }} + env: + NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} + NPM_CONFIG_PROVENANCE: true