Skip to content

Commit 5694d7e

Browse files
build: reset version action (#1010)
* build: reset version action * add filtering on sdk-codegen-all tag Co-authored-by: Joel Dodge <[email protected]>
1 parent b1650a1 commit 5694d7e

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

.github/workflows/reset-versions.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Reset versions in release-please-config.json
2+
on:
3+
release:
4+
types: published
5+
6+
workflow_dispatch:
7+
8+
jobs:
9+
reset-vers:
10+
if: startsWith(github.event.release.tag_name, 'sdk-codegen-all')
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Repo Checkout
14+
uses: actions/checkout@v2
15+
with:
16+
persist-credentials: false
17+
fetch-depth: 0
18+
19+
- name: Rewrite release-please-congfig.json
20+
run: |
21+
cp release-please-config.json.template release-please-config.json
22+
git add release-please-config.json
23+
git -c "user.name looker-open-source-automation-bot"\
24+
-c "user.email [email protected]"\
25+
release-please-config.json
26+
commit "chore: reset release-please config"
27+
28+
# Use the github run_id to make sure the branch name is unique.
29+
# On a rerun of a failed run, the run_id will be the same, so the
30+
# force: true makes sure it succeeds the second time.
31+
- name: Push changes
32+
uses: ad-m/[email protected]
33+
with:
34+
github_token: ${{ secrets.LOS_AUTO_BOT_RP_TOKEN }}
35+
branch: losautobot/reset-release-please-config-${{ github.run_id }}
36+
force: true
37+
38+
- name: Initialize Pull Request
39+
uses: gha-utilities/[email protected]
40+
with:
41+
pull_request_token: ${{ secrets.LOS_AUTO_BOT_RP_TOKEN }}
42+
head: losautobot/reset-release-please-config-${{ github.run_id }}
43+
base: main
44+
title: 'chore: reset release-please config'

release-please-config.json.template

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"plugins": ["node-workspace"],
3+
"bump-minor-pre-major": true,
4+
"bump-patch-for-minor-pre-major": true,
5+
"packages": {
6+
".": { "release-as": "" },
7+
"packages/api-explorer": { "release-as": "" },
8+
"packages/code-editor": { "release-as": "" },
9+
"packages/extension-api-explorer": { },
10+
"packages/extension-sdk": { },
11+
"packages/extension-sdk-react": { },
12+
"packages/extension-utils": { "release-as": "" },
13+
"packages/hackathon": { },
14+
"packages/run-it": { "release-as": "" },
15+
"packages/sdk": { },
16+
"packages/sdk-codegen": { "release-as": "" },
17+
"packages/sdk-codegen-scripts": { "release-as": "" },
18+
"packages/sdk-codegen-utils": { "release-as": "" },
19+
"packages/sdk-node": { },
20+
"packages/sdk-rtl": { "release-as": "" },
21+
"packages/wholly-sheet": { "release-as": "" },
22+
"python": { "release-type": "python", "package-name": "looker_sdk" }
23+
}
24+
}

0 commit comments

Comments
 (0)