ci: add workflow to release branches

This commit is contained in:
Daniel Roe 2023-05-15 22:26:21 +01:00
parent 22f4be9e06
commit bc28d536c0
2 changed files with 49 additions and 1 deletions

48
.github/workflows/release-pr.yml vendored Normal file
View File

@ -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

View File

@ -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",