From dd08d0dc730fd3ffad61f99e5d81fbe18d283da2 Mon Sep 17 00:00:00 2001 From: Emre Sahin Date: Sun, 4 Aug 2024 18:46:01 +0300 Subject: [PATCH] Add publish github action --- .github/workflows/publish.yml | 41 +++++++++++++++++++++++++++++++++++ CHANGELOG.md | 1 + 2 files changed, 42 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..e0987a66 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,41 @@ +name: Publish Crates + +on: + push: + tags: + - "v*.*.*" # Matches tags like v0.6.10 but also v0.6.10-alpha.5 + +jobs: + publish: + # Don't publish alpha releases + # if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-') + runs-on: ubuntu-latest + strategy: + matrix: + package: + [ + xvc-logging, + xvc-test-helper, + xvc-walker, + xvc-ecs, + xvc-config, + xvc-core, + xvc-storage, + xvc-file, + xvc-pipelines, + xvc, + ] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Publish to crates.io + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + run: cargo publish -p {{ matrix.package }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 52188f90..3449cfc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Documentation updates - Fix optional features. Now inter-workspace dependencies are defined by `default-features = false` on Cargo.toml - Added `bundled-openssl` feature to use `vendored` feature of `openssl` crate optionally. This is turned on for Windows builds on GA. +- Crates are published from Github Actions ## 0.6.9 (2024-07-29)