Skip to content

Commit 85b0ef0

Browse files
authored
Merge pull request facebook#65 from huitseeker/auto-publish
Add publishing job
2 parents 8ccb5ad + 18bcd23 commit 85b0ef0

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published] # Only publish to crates.io when we formally publish a release
6+
# For more on how to formally release on Github, read https://help.github.com/en/articles/creating-releases
7+
8+
jobs:
9+
publish:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest]
14+
15+
steps:
16+
- uses: hecrj/setup-rust-action@v1
17+
with:
18+
rust-version: ${{ matrix.rust }}
19+
- uses: actions/checkout@master
20+
- name: Login to crates.io
21+
run: cargo login $CRATES_IO_TOKEN
22+
env:
23+
CRATES_IO_TOKEN: ${{ secrets.crates_io_token }} # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets
24+
- name: Dry run publish opaque-ke
25+
run: cargo publish --dry-run --manifest-path Cargo.toml
26+
- name: Publish opaque-ke
27+
run: cargo publish --manifest-path Cargo.toml
28+
env:
29+
CARGO_REGISTRY_TOKEN: ${{ secrets.crates_io_token }}

0 commit comments

Comments
 (0)