Skip to content

Commit 48156e9

Browse files
committed
ci: Adding "publish crates" workflow
Signed-off-by: Alexis Asseman <[email protected]>
1 parent df4bd27 commit 48156e9

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/release_please.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,32 @@ name: release-please
1212
jobs:
1313
release-please:
1414
runs-on: ubuntu-latest
15+
outputs:
16+
releases_created: ${{ steps.release-please.outputs.releases_created }}
1517
steps:
1618
- name: Generate token
1719
id: generate_token
1820
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 #v1.8.0
1921
with:
2022
app_id: ${{ secrets.PR_AUTOMATION_APP_ID }}
2123
private_key: ${{ secrets.PR_AUTOMATION_APP_PEM }}
22-
- uses: google-github-actions/release-please-action@8016a6649226f2ec88ed05441c11bb5410a22d29 #v3.7.10
24+
- name: Release please
25+
id: release-please
26+
uses: google-github-actions/release-please-action@8016a6649226f2ec88ed05441c11bb5410a22d29 #v3.7.10
2327
with:
2428
command: manifest
2529
token: ${{ steps.generate_token.outputs.token }}
30+
31+
publish-crates:
32+
runs-on: ubuntu-latest
33+
# run only if release-please had released a new version
34+
needs: release-please
35+
if: needs.release-please.outputs.releases_created == 'true'
36+
steps:
37+
- uses: actions/checkout@v2
38+
- name: Install cargo-workspaces
39+
run: cargo install cargo-workspaces
40+
- name: Publish workspace crates
41+
run: cargo workspaces publish --from-git -y
42+
env:
43+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)