mirror of
https://github.com/orhun/git-cliff.git
synced 2024-09-11 15:05:30 +03:00
fix(cd): install the Rust toolchain explicitly for crates.io releases
This commit is contained in:
parent
c427eed757
commit
2cee3bf9ec
20
.github/workflows/cd.yml
vendored
20
.github/workflows/cd.yml
vendored
@ -140,17 +140,20 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
- name: Set the release version
|
||||
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV
|
||||
- name: Install Rust toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
target: x86_64-unknown-linux-gnu
|
||||
override: true
|
||||
- name: Prepare for the crates.io release
|
||||
run: |
|
||||
mkdir git-cliff-core/config/
|
||||
cp config/cliff.toml git-cliff-core/config/
|
||||
sed -i 's|"../config/"|"config/"|' git-cliff-core/src/embed.rs
|
||||
- name: Publish the library
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: publish
|
||||
args: |
|
||||
--allow-dirty --manifest-path git-cliff-core/Cargo.toml
|
||||
run: |
|
||||
cargo publish --allow-dirty --manifest-path git-cliff-core/Cargo.toml \
|
||||
--locked --token ${{ secrets.CARGO_TOKEN }}
|
||||
- name: Wait for library to update
|
||||
shell: bash
|
||||
@ -158,9 +161,6 @@ jobs:
|
||||
crate_status="https://raw.githubusercontent.com/rust-lang/crates.io-index/master/gi/t-/git-cliff-core"
|
||||
until curl -s "$crate_status" | grep -q '"vers":"${{ env.RELEASE_VERSION }}"'; do sleep 5; done;
|
||||
- name: Publish the binary
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: publish
|
||||
args: |
|
||||
--allow-dirty --manifest-path git-cliff/Cargo.toml
|
||||
run: |
|
||||
cargo publish --allow-dirty --manifest-path git-cliff/Cargo.toml \
|
||||
--locked --token ${{ secrets.CARGO_TOKEN }}
|
||||
|
Loading…
Reference in New Issue
Block a user