mirror of
https://github.com/bartvdbraak/keyweave.git
synced 2025-04-28 07:11:21 +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
|
keyweave-x86_64-pc-windows-gnu/keyweave.exe
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs:
|
needs: build
|
||||||
- pre-check
|
|
||||||
- build
|
|
||||||
|
|
||||||
name: Sign and Release
|
name: Sign and Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
sha256sums: ${{ steps.homebrew-inputs.outputs.sha256sums }}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
id-token: write
|
id-token: write
|
||||||
contents: write
|
contents: write
|
||||||
|
@ -188,13 +188,18 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
sha256sums="{$(awk '{printf "%s '\''%s'\'': '\''%s'\''", (NR>1 ? "," : ""), $2, $1} END {print ""}' SHA256SUMS)}"
|
sha256sums="{$(awk '{printf "%s '\''%s'\'': '\''%s'\''", (NR>1 ? "," : ""), $2, $1} END {print ""}' SHA256SUMS)}"
|
||||||
echo "sha256sums=$sha256sums" >> $GITHUB_OUTPUT
|
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
|
- uses: actions/github-script@v6
|
||||||
name: Dispatch Homebrew release
|
name: Dispatch Homebrew release
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.PAT_TOKEN }}
|
github-token: ${{ secrets.PAT_TOKEN }}
|
||||||
script: |
|
script: |
|
||||||
const sha256sums = ${{ steps.homebrew-inputs.outputs.sha256sums }}
|
const sha256sums = ${{ needs.release.outputs.sha256sums }}
|
||||||
await github.rest.actions.createWorkflowDispatch({
|
await github.rest.actions.createWorkflowDispatch({
|
||||||
owner: 'bartvdbraak',
|
owner: 'bartvdbraak',
|
||||||
repo: 'homebrew-keyweave',
|
repo: 'homebrew-keyweave',
|
||||||
|
@ -206,18 +211,14 @@ jobs:
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
publish:
|
publish-crate:
|
||||||
needs: release
|
needs: release
|
||||||
name: Publish crate
|
name: Publish rust crate
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Install stable toolchain
|
- uses: actions/checkout@v4
|
||||||
uses: actions-rs/toolchain@v1
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
- name: Publish to crates.io
|
||||||
profile: minimal
|
run: cargo publish --token ${CARGO_REGISTRY_TOKEN}
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- run: cargo publish --token ${CARGO_REGISTRY_TOKEN}
|
|
||||||
env:
|
env:
|
||||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
Loading…
Reference in a new issue