Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to '.github/workflows/publish-libs.yaml')
-rw-r--r--.github/workflows/publish-libs.yaml35
1 files changed, 35 insertions, 0 deletions
diff --git a/.github/workflows/publish-libs.yaml b/.github/workflows/publish-libs.yaml
new file mode 100644
index 0000000000..1b843fff1a
--- /dev/null
+++ b/.github/workflows/publish-libs.yaml
@@ -0,0 +1,35 @@
+name: publish-libs
+on:
+ workflow_dispatch:
+ push:
+ branches:
+ - main
+ paths:
+ - 'lib/**'
+
+jobs:
+ publish-libs:
+ name: publish
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Install Rust toolchain
+ run: rustup update --no-self-update stable
+
+ - name: Install cargo-workspaces
+ run: cargo install cargo-workspaces
+
+ - name: Publish Crates
+ env:
+ CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
+ shell: bash
+ run: |
+ git config --global user.email "[email protected]"
+ git config --global user.name "Github Action"
+ # Remove r-a crates from the workspaces so we don't auto-publish them as well
+ sed -i 's/ "crates\/\*"//' ./Cargo.toml
+ cargo workspaces publish --yes --exact --from-git --no-git-commit --allow-dirty