Skip to content

Commit

Permalink
ci: add workflow to release branches
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed May 15, 2023
1 parent 22f4be9 commit bc28d53
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .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
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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",
Expand Down

0 comments on commit bc28d53

Please sign in to comment.