Nuxt/.github/workflows/release-pr.yml

50 lines
1.2 KiB
YAML
Raw Normal View History

2023-05-15 21:26:21 +00:00
name: release
on:
issue_comment:
types: [created]
env:
# 7 GiB by default on GitHub, setting to 6 GiB
NODE_OPTIONS: --max-old-space-size=6144
jobs:
release-pr:
2023-05-15 21:30:04 +00:00
if: ${{ github.event.issue.pull_request && github.event.comment.body == '/trigger release' }}
2023-05-15 21:26:21 +00:00
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:
2023-05-15 21:31:14 +00:00
route: GET /repos/nuxt/nuxt/collaborators/${{ github.event.comment.user.login }}
2023-05-15 21:26:21 +00:00
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
TAG: pr-${{ github.event.issue.number }}