mirror of
https://github.com/bartvdbraak/keyweave.git
synced 2025-04-27 23:01:20 +00:00
Merge pull request #22 from bartvdbraak/fix/publish-crates
Use updated `rust` toolchain tasks and parallel publishing jobs
This commit is contained in:
commit
d279f17fe2
1 changed files with 17 additions and 16 deletions
33
.github/workflows/release.yml
vendored
33
.github/workflows/release.yml
vendored
|
@ -146,12 +146,12 @@ jobs:
|
|||
keyweave-x86_64-pc-windows-gnu/keyweave.exe
|
||||
|
||||
release:
|
||||
needs:
|
||||
- pre-check
|
||||
- build
|
||||
|
||||
needs: build
|
||||
name: Sign and Release
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
sha256sums: ${{ steps.homebrew-inputs.outputs.sha256sums }}
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
@ -188,13 +188,18 @@ jobs:
|
|||
run: |
|
||||
sha256sums="{$(awk '{printf "%s '\''%s'\'': '\''%s'\''", (NR>1 ? "," : ""), $2, $1} END {print ""}' SHA256SUMS)}"
|
||||
echo "sha256sums=$sha256sums" >> $GITHUB_OUTPUT
|
||||
|
||||
|
||||
publish-brew:
|
||||
needs: [release, pre-check]
|
||||
name: Publish brew formula
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
name: Dispatch Homebrew release
|
||||
with:
|
||||
github-token: ${{ secrets.PAT_TOKEN }}
|
||||
script: |
|
||||
const sha256sums = ${{ steps.homebrew-inputs.outputs.sha256sums }}
|
||||
const sha256sums = ${{ needs.release.outputs.sha256sums }}
|
||||
await github.rest.actions.createWorkflowDispatch({
|
||||
owner: 'bartvdbraak',
|
||||
repo: 'homebrew-keyweave',
|
||||
|
@ -206,18 +211,14 @@ jobs:
|
|||
}
|
||||
})
|
||||
|
||||
publish:
|
||||
publish-crate:
|
||||
needs: release
|
||||
name: Publish crate
|
||||
name: Publish rust crate
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install stable toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
- run: cargo publish --token ${CARGO_REGISTRY_TOKEN}
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: Publish to crates.io
|
||||
run: cargo publish --token ${CARGO_REGISTRY_TOKEN}
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
Loading…
Reference in a new issue