Skip to content

Commit 8f46a8c

Browse files
committed
Automate cargo crates release naively
This implements a barebones `cargo publish` on merge to `main` that will fail if we don't manually update the version. There are more sophisticated solutions involving `cargo release`, but this suffices for our needs.
1 parent 7e6978d commit 8f46a8c

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/pullrequest.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,35 @@ jobs:
5656
- run: cargo fmt --all -- --check
5757
- run: cargo doc --all --exclude plexi-cli --all-features --document-private-items
5858
- run: cargo test --all --verbose --exclude plexi-cli --all-features
59+
60+
deploy-rust:
61+
name: Test Rust
62+
timeout-minutes: 5
63+
strategy:
64+
matrix:
65+
os: [ubuntu-24.04]
66+
runs-on: ${{ matrix.os }}
67+
if: ${{ github.ref == 'refs/heads/main' }}
68+
needs:
69+
- "test-rust"
70+
steps:
71+
- uses: actions/checkout@v4
72+
with:
73+
fetch-depth: 1
74+
- name: Cache
75+
uses: actions/cache@v4
76+
with:
77+
path: |
78+
~/.cargo/registry
79+
~/.cargo/git
80+
target
81+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
82+
- name: Set rust toolchain
83+
run: rustup override set 1.87
84+
- name: cargo login
85+
run: |-
86+
echo "${{ secrets.CRATES_IO_API_TOKEN }}" | cargo login
87+
- run: cargo publish -p web-bot-auth # will fail if we don't bump the version
88+
continue-on-error: true
89+
- run: cargo publish -p http-signature-directory # will fail if we don't bump the version
90+
continue-on-error: true

0 commit comments

Comments
 (0)