forked from googleapis/release-please
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.26 KB
/
release.yaml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Create GitHub releases
on:
push:
branches:
- main
jobs:
create-releases:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout release branch
run: |
git config --global user.name "Stainless Bot"
git config --global user.email "stainless-bot@users.noreply.github.com"
git checkout release
- name: Merge main into release branch
run: |
git pull origin release --rebase=false --ff-only
git merge --no-ff main
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- run: corepack enable && corepack prepare
# Note: actions/setup-node doesn't yet provide parameters for corepack, we need to run it again after enabling it
- uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Compile
run: pnpm build
- name: Commit and push build directory
run: |
git add -f ./build
git diff --cached --exit-code || git commit -m "Build sources"
git push origin release