rust/.github/workflows/publish-libs.yaml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
958 B
YAML
Raw Normal View History

2023-02-13 05:55:14 -06:00
name: publish-libs
on:
workflow_dispatch:
push:
branches:
- master
2023-02-13 05:55:14 -06:00
paths:
- "lib/**"
2023-02-13 05:55:14 -06:00
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 "runner@gha.local"
git config --global user.name "GitHub Action"
2023-02-13 05:55:14 -06:00
# 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