Skip to content

Commit fc9456e

Browse files
committed
Add github workflow for publishing crates
1 parent f4053d2 commit fc9456e

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches: [ main ]
66
pull_request:
7-
branches: [ main ]
87

98
jobs:
109
format_and_lint_programs:

.github/workflows/rust-publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release Rust Crates
2+
3+
# Will run if 'Main' workflow was successful on main branch
4+
on:
5+
workflow_run:
6+
workflows: [ "Main" ]
7+
types: [ completed ]
8+
branches: [ main ]
9+
10+
jobs:
11+
publish_rust:
12+
name: Publish Rust Crates
13+
runs-on: ubuntu-latest
14+
if: github.event.workflow_run.conclusion == 'success'
15+
steps:
16+
- name: Git Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.event.workflow_run.head_sha }}
20+
21+
- name: Setup Environment
22+
uses: ./.github/actions/setup
23+
24+
- name: Publish All Crates in Workspace
25+
uses: katyo/publish-crates@v2
26+
with:
27+
path: .
28+
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
29+
ignore-unpublished-changes: true

0 commit comments

Comments
 (0)