mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-14 17:07:26 +00:00
Auto merge of #14026 - jonas-schievink:fix-libs-publish, r=jonas-schievink
internal: Try to fix auto-publishing of lib crates https://github.com/rust-lang/rust-analyzer/issues/13912
This commit is contained in:
commit
3e57a77cd1
2 changed files with 37 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
name: publish
|
||||
name: autopublish
|
||||
on:
|
||||
workflow_dispatch: # We can add version input when 1.0 is released and scheduled releases are removed
|
||||
|
||||
|
@ -25,7 +25,7 @@ jobs:
|
|||
- name: Install cargo-workspaces
|
||||
run: cargo install cargo-workspaces
|
||||
|
||||
- name: Release
|
||||
- name: Publish Crates
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
PATCH: ${{ github.run_number }}
|
35
.github/workflows/publish-libs.yaml
vendored
Normal file
35
.github/workflows/publish-libs.yaml
vendored
Normal file
|
@ -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 "runner@gha.local"
|
||||
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
|
Loading…
Reference in a new issue