-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 1.05 KB
/
release-please.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
on:
push:
branches:
- development
- release/*
permissions:
contents: write
pull-requests: write
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: gh pr view --json labels
env:
GH_TOKEN: ${{ github.token }}
- id: setup
env:
SCRIPT: |
const e = /^release\/(?<name>\w+)/;
const groups = e.exec(process.env.GITHUB_REF_NAME)?.groups
const releaseName = groups?.name ?? "latest";
console.log(`RELEASE_NAME=${releaseName}`);
console.log(`PRERELEASE=${releaseName==="latest"?'true':'false'}`);
run: node -e "$SCRIPT" >> $GITHUB_OUTPUT
- uses: google-github-actions/release-please-action@v3
with:
release-type: node
prerelease: ${{ steps.setup.outputs.PRERELEASE }}
monorepo-tags: true
package-name: ${{ steps.setup.outputs.RELEASE_NAME }}
default-branch: ${{ github.ref_name }}