Skip to content

Commit a49a2ad

Browse files
authored
chore: switch to release workflow used in other repos (#84)
1 parent 01e1c9b commit a49a2ad

2 files changed

Lines changed: 60 additions & 94 deletions

File tree

.github/workflows/release-please.yml

Lines changed: 0 additions & 94 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: 'release'
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: 'ubuntu-latest'
12+
steps:
13+
- uses: 'actions/checkout@v2'
14+
15+
- uses: 'actions/setup-node@v2'
16+
with:
17+
node-version: '16.x'
18+
19+
- name: 'npm build'
20+
run: 'npm ci && npm run build && npm run docs'
21+
22+
- name: 'Create pull request'
23+
uses: 'peter-evans/create-pull-request@dcd5fd746d53dd8de555c0f10bca6c35628be47a'
24+
with:
25+
token: '${{ secrets.ACTIONS_BOT_TOKEN }}'
26+
add-paths: 'dist/'
27+
committer: 'google-github-actions-bot <github-actions-bot@google.com>'
28+
author: 'google-github-actions-bot <github-actions-bot@google.com>'
29+
signoff: 'google-github-actions-bot <github-actions-bot@google.com>'
30+
commit-message: 'Build dist'
31+
title: 'chore: build dist'
32+
body: 'Build compiled Typescript'
33+
base: 'main'
34+
branch: 'actions/build'
35+
push-to-fork: 'google-github-actions-bot/setup-cloud-sdk'
36+
delete-branch: true
37+
38+
# create-pull-request creates a release pull request if there are any
39+
# convential commit changes since the last release.
40+
create-pull-request:
41+
runs-on: 'ubuntu-latest'
42+
steps:
43+
- uses: 'google-github-actions/release-please-action@v2'
44+
with:
45+
token: '${{ secrets.ACTIONS_BOT_TOKEN }}'
46+
release-type: 'node'
47+
bump-minor-pre-major: true
48+
command: 'release-pr'
49+
fork: true
50+
51+
# release does a release on the merge of the release pull request.
52+
release:
53+
runs-on: 'ubuntu-latest'
54+
steps:
55+
- id: 'release'
56+
uses: 'google-github-actions/release-please-action@v2'
57+
with:
58+
release-type: 'node'
59+
bump-minor-pre-major: true
60+
command: 'github-release'

0 commit comments

Comments
 (0)