ci: harden release action (#113)
This commit is contained in:
parent
583a513448
commit
1fc5be641f
1 changed files with 13 additions and 6 deletions
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
|
|
@ -156,12 +156,19 @@ jobs:
|
|||
if: github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/tags/release')
|
||||
needs: [fmt, clippy, test]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
# Since this job has access to the `CRATES_TOKEN`, it's probably a good
|
||||
# idea to be extra careful about what Actions are being called. The reason
|
||||
# is that if an attacker gains access to other actions such as
|
||||
# `Swatinem/rust-cache`, they could use that to steal the `CRATES_TOKEN`.
|
||||
# This happened recently in the attack on `tj-actions/changed-files`, but
|
||||
# has happened many times before as well.
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Update Rust
|
||||
run: |
|
||||
rustup update stable
|
||||
rustup default stable
|
||||
|
||||
- name: Cargo login
|
||||
run: cargo login ${{ secrets.CRATES_TOKEN }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue