Skip to content

Commit 9ee78e1

Browse files
cedinalum
andcommitted
chore(release)!: Separate pre-release from release workflow (#73)
Co-authored-by: Cedric Kienzler <cedric@specht-labs.de> Co-authored-by: Luke Mallon <luke@mallon.ie>
1 parent 631ddfe commit 9ee78e1

File tree

4 files changed

+38
-18
lines changed

4 files changed

+38
-18
lines changed

.github/workflows/pre-release.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Create Release PR
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 * * * *"
7+
8+
permissions: write-all
9+
10+
jobs:
11+
release-please:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- uses: googleapis/release-please-action@v4
20+
id: release-please
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yaml

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
1-
name: Go Build - Release
1+
name: Go Release
22

33
on:
44
push:
5-
branches: [main]
5+
tags:
6+
- "v*"
67

78
permissions: write-all
89

910
jobs:
10-
# Release-please for auto-updated PRs
11-
release-please:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: google-github-actions/release-please-action@v3
15-
id: release-please
16-
with:
17-
release-type: simple # actual releasing is handled by goreleaser
18-
package-name: compute-blade-agent
19-
bump-minor-pre-major: true
20-
outputs:
21-
release_created: ${{ steps.release-please.outputs.release_created }}
22-
2311
test:
2412
name: Unit Tests
2513
runs-on: ubuntu-latest
@@ -83,11 +71,8 @@ jobs:
8371
goreleaser:
8472
runs-on: ubuntu-latest
8573
needs:
86-
- release-please
8774
- tinygo
8875

89-
if: needs.release-please.outputs.release_created
90-
9176
steps:
9277
- name: Checkout
9378
uses: actions/checkout@v4

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "v0.8.2"
3+
}

release-please-config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"bump-minor-pre-major": true,
3+
"packages": {
4+
".": {
5+
"bump-minor-pre-major": true,
6+
"package-name": "compute-blade-agent",
7+
"release-type": "simple"
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)