Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,24 @@ jobs:
installers-regex: '\.exe$'
delete-previous-version: 'true'
token: ${{ secrets.WINGET_TOKEN }}

cargo-publish:
name: Publish to crates.io
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always

steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: clippy

- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish
Comment on lines +66 to +85
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cargo-publish:
name: Publish to crates.io
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: clippy
- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish
- name: Publish to crates.io
if: matrix.os == 'ubuntu-latest'
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish

Why not just make it a step like the others?

Copy link
Collaborator Author

@spenserblack spenserblack Oct 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's a separate job it can run in parallel without waiting on other steps or making other steps wait on it. But I'm not too attached to making it a separate job, so if you prefer it as a step then 👍 from me. I'll be happy either way 😃