This published commits to master with a tag. Relies on a GHA token named crates_io.
30 lines
981 B
YAML
30 lines
981 B
YAML
name: Publish
|
|
|
|
on:
|
|
release:
|
|
types: [published] # Only publish to crates.io when we formally publish a release
|
|
# For more on how to formally release on Github, read https://help.github.com/en/articles/creating-releases
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
|
|
steps:
|
|
- uses: hecrj/setup-rust-action@v1
|
|
with:
|
|
rust-version: ${{ matrix.rust }}
|
|
- uses: actions/checkout@master
|
|
- name: Login to crates.io
|
|
run: cargo login $CRATES_IO_TOKEN
|
|
env:
|
|
CRATES_IO_TOKEN: ${{ secrets.crates_io_token }} # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets
|
|
- name: Dry run publish opaque-ke
|
|
run: cargo publish --dry-run --manifest-path Cargo.toml
|
|
- name: Publish opaque-ke
|
|
run: cargo publish --manifest-path Cargo.toml
|
|
env:
|
|
CARGO_REGISTRY_TOKEN: ${{ secrets.crates_io_token }}
|