Skip to content

Commit

Permalink
ci fix
Browse files Browse the repository at this point in the history
  • Loading branch information
joyqvq committed Sep 19, 2022
1 parent 49b6cf7 commit 5550248
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 26 deletions.
27 changes: 4 additions & 23 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- ci1
env:
CARGO_TERM_COLOR: always
# Disable incremental compilation.
Expand All @@ -26,26 +27,6 @@ env:
RUST_BACKTRACE: short

jobs:
deny-public-api-changes:
runs-on: ubuntu-latest
steps:
# Full git history needed
- uses: actions/checkout@v3
with:
fetch-depth: 0

# Install nightly (stable is already installed)
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true

# Install and run cargo public-api and deny any API diff
- run: cargo install cargo-public-api@0.14.0
- run: |
diff -u public-api.txt <(cargo +nightly-2022-08-15 public-api) ||
(echo '\nFAIL: Public API changed! To bless, `git commit` the result of `cargo +nightly-2022-08-15 public-api > public-api.txt`' && exit 1)
publish:
name: Publish to crates.io
continue-on-error: false
Expand Down Expand Up @@ -85,8 +66,8 @@ jobs:
git push origin "${{ matrix.package }}-v$CURRENT_VERSION"
- uses: actions-rs/toolchain@v1
if: steps.check.outputs.is_new_version == 'yes'
- name: Login
run: cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish fastcrypto
if: steps.check.outputs.is_new_version == 'yes'
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
25 changes: 24 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
- uses: EmbarkStudios/cargo-deny-action@v1

check-public-api-changes:
runs-on: ubuntu-latest
steps:
# Full git history needed
- uses: actions/checkout@v2
with:
fetch-depth: 0

# Install nightly (stable is already installed)
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-08-15
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
# Install and run cargo public-api and deny any API diff
- run: cargo install cargo-public-api@0.14.0
- run: |
diff -u public-api.txt <(cargo +nightly-2022-08-15 public-api) ||
(echo '\nFAIL: Public API changed! To bless, `git commit` the result of `cargo +nightly-2022-08-15 public-api > public-api.txt`' && exit 1)
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fastcrypto"
version = "0.1.3"
version = "1.0.0"
license = "Apache-2.0"
authors = ["Mysten Labs <build@mystenlabs.com>"]
edition = "2021"
Expand Down

0 comments on commit 5550248

Please sign in to comment.