mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-30 15:03:42 +00:00
35 lines
935 B
YAML
35 lines
935 B
YAML
name: publish-libs
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- "lib/**"
|
|
|
|
jobs:
|
|
publish-libs:
|
|
name: publish
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
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"
|
|
# Only publish the crates under lib/
|
|
sed -i 's|^members = .*$|members = ["lib/*"]|' Cargo.toml
|
|
cargo workspaces publish --yes --exact --from-git --no-git-commit --allow-dirty
|