2023-01-25 14:02:52 +00:00
|
|
|
name: publish-libs
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches:
|
2023-05-07 09:40:37 +00:00
|
|
|
- master
|
2023-01-25 14:02:52 +00:00
|
|
|
paths:
|
2023-05-07 09:40:37 +00:00
|
|
|
- "lib/**"
|
2023-01-25 14:02:52 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish-libs:
|
|
|
|
name: publish
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2024-02-16 12:23:10 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-01-25 14:02:52 +00:00
|
|
|
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 "runner@gha.local"
|
2023-04-13 22:35:00 +00:00
|
|
|
git config --global user.name "GitHub Action"
|
2024-08-12 10:45:38 +00:00
|
|
|
# Only publish the crates under lib/
|
|
|
|
sed -i 's|^members = .*$|members = ["lib/*"]|' Cargo.toml
|
2023-01-25 14:02:52 +00:00
|
|
|
cargo workspaces publish --yes --exact --from-git --no-git-commit --allow-dirty
|