Skip to content

Commit

Permalink
Merge pull request #25 from s-simoncelli/add-new-cargo-publish-ci
Browse files Browse the repository at this point in the history
Added cargo publish workflow
  • Loading branch information
s-simoncelli authored Aug 26, 2024
2 parents cd25342 + 554f6fb commit 48e75bb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 22 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/release-crate.yaml

This file was deleted.

16 changes: 15 additions & 1 deletion .github/workflows/tests.yaml → .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and test
name: Build, test and publish
on:
push:
branches: [ main ]
Expand All @@ -24,6 +24,20 @@ jobs:
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose --all --all-features

crates_io_publish:
name: Publish (crates.io)
needs:
- test-linux
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
steps:
- uses: actions/checkout@v4
- name: cargo login
run: cargo login ${{ secrets.CRATES_IO_API_TOKEN }}
- name: Publish
run: cargo publish --verbose --no-verify -p optirustic

# NOTE disabled due to compiler failure in hv-fonseca crate
# test-windows:
# name: Cargo check and test on Windows
Expand Down

0 comments on commit 48e75bb

Please sign in to comment.