Skip to content

Commit 7650355

Browse files
authored
chore: add release please config (#20)
Signed-off-by: Michael Beemer <[email protected]>
1 parent a1a8573 commit 7650355

File tree

3 files changed

+133
-0
lines changed

3 files changed

+133
-0
lines changed

.github/workflows/release-please.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Run Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
release-please:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write # for googleapis/release-please-action to create release commit
16+
pull-requests: write # for googleapis/release-please-action to create release PR
17+
# Release-please creates a PR that tracks all changes
18+
steps:
19+
- uses: googleapis/release-please-action@v3
20+
id: release
21+
with:
22+
command: manifest
23+
token: ${{secrets.RELEASE_PLEASE_ACTION_TOKEN}}
24+
default-branch: main
25+
signoff: "OpenFeature Bot <[email protected]>"
26+
- name: Dump Release Please Output
27+
env:
28+
RELEASE_PLEASE_OUTPUT: ${{ toJson(steps.release.outputs) }}
29+
run: |
30+
echo "$RELEASE_PLEASE_OUTPUT"
31+
outputs:
32+
release_created: ${{ steps.release.outputs.releases_created }}
33+
all: ${{ toJSON(steps.release.outputs) }}
34+
paths_released: ${{ steps.release.outputs.paths_released }}
35+
36+
cargo-publish:
37+
needs: release-please
38+
runs-on: ubuntu-latest
39+
if: ${{ fromJSON(needs.release-please.outputs.release_created || false) }}
40+
strategy:
41+
matrix:
42+
path: ${{ fromJSON(needs.release-please.outputs.paths_released || '[]') }}
43+
44+
steps:
45+
- uses: actions/checkout@v4
46+
with:
47+
submodules: recursive
48+
49+
- name: Install protobuf compiler
50+
run: |
51+
sudo apt-get update
52+
sudo apt-get install -y protobuf-compiler
53+
54+
- name: Setup cache
55+
uses: Swatinem/rust-cache@v2
56+
57+
- name: Publish
58+
run: |
59+
cargo publish
60+
env:
61+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
62+
working-directory: ${{ matrix.path }}

.release-please-manifest.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"crates/env-var": "0.1.0",
3+
"crates/flagd": "0.0.1",
4+
"crates/flipt": "0.1.0"
5+
}

release-please-config.json

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"separate-pull-requests": true,
3+
"release-type": "rust",
4+
"bump-minor-pre-major": true,
5+
"bump-patch-for-minor-pre-major": true,
6+
"packages": {
7+
"crates/env-var": {},
8+
"crates/flagd": {},
9+
"crates/flipt": {}
10+
},
11+
"changelog-sections": [
12+
{
13+
"type": "fix",
14+
"section": "🐛 Bug Fixes"
15+
},
16+
{
17+
"type": "feat",
18+
"section": "✨ New Features"
19+
},
20+
{
21+
"type": "chore",
22+
"section": "🧹 Chore"
23+
},
24+
{
25+
"type": "docs",
26+
"section": "📚 Documentation"
27+
},
28+
{
29+
"type": "perf",
30+
"section": "🚀 Performance"
31+
},
32+
{
33+
"type": "build",
34+
"hidden": true,
35+
"section": "🛠️ Build"
36+
},
37+
{
38+
"type": "deps",
39+
"section": "📦 Dependencies"
40+
},
41+
{
42+
"type": "ci",
43+
"hidden": true,
44+
"section": "🚦 CI"
45+
},
46+
{
47+
"type": "refactor",
48+
"section": "🔄 Refactoring"
49+
},
50+
{
51+
"type": "revert",
52+
"section": "🔙 Reverts"
53+
},
54+
{
55+
"type": "style",
56+
"hidden": true,
57+
"section": "🎨 Styling"
58+
},
59+
{
60+
"type": "test",
61+
"hidden": true,
62+
"section": "🧪 Tests"
63+
}
64+
],
65+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
66+
}

0 commit comments

Comments
 (0)