From bc28d536c0dd1061ac96cea0241857c1d4e4e0f2 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 15 May 2023 22:26:21 +0100 Subject: [PATCH] ci: add workflow to release branches --- .github/workflows/release-pr.yml | 48 ++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release-pr.yml diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml new file mode 100644 index 0000000000..697ca8e324 --- /dev/null +++ b/.github/workflows/release-pr.yml @@ -0,0 +1,48 @@ +name: release + +on: + issue_comment: + types: [created] + contains: "/trigger release" + +env: + # 7 GiB by default on GitHub, setting to 6 GiB + NODE_OPTIONS: --max-old-space-size=6144 + +jobs: + release-pr: + permissions: + id-token: write + runs-on: ubuntu-latest + timeout-minutes: 20 + + steps: + - name: Ensure action is by maintainer + uses: octokit/request-action@v2.x + id: check_role + with: + route: GET /repos/danielroe/roe.dev/collaborators/${{ github.event.comment.user.login }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - 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: Build + run: pnpm build + + - name: Release Edge + run: ./scripts/release-edge.sh + env: + NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} + NPM_CONFIG_PROVENANCE: true diff --git a/package.json b/package.json index 1074dcd230..48bb566f51 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "license": "MIT", "type": "module", "scripts": { - "build": "FORCE_COLOR=1 pnpm --filter './packages/**' prepack", + "build": "pnpm --filter './packages/**' prepack", "build:stub": "pnpm --filter './packages/**' prepack --stub", "cleanup": "rimraf 'packages/**/node_modules' 'examples/**/node_modules' 'docs/node_modules' 'playground/node_modules' 'node_modules'", "dev": "pnpm play",