mirror of
https://github.com/bartvdbraak/keyweave.git
synced 2025-05-03 17:41:20 +00:00
fix: sha256 file, transform and workflow dispatch
This commit is contained in:
parent
6226f282a3
commit
5fbaf26aab
2 changed files with 30 additions and 40 deletions
.github/workflows
33
.github/workflows/release.yml
vendored
33
.github/workflows/release.yml
vendored
|
@ -167,8 +167,10 @@ jobs:
|
|||
with:
|
||||
name: builds
|
||||
|
||||
- name: Checksums with SHA512
|
||||
run: sha512sum keyweave-* | tee SHA512SUMS
|
||||
- name: Checksums with SHA512 and SHA256
|
||||
run: |
|
||||
sha512sum keyweave-* | tee SHA512SUMS
|
||||
sha256sum keyweave-* | tee SHA256SUMS
|
||||
|
||||
- uses: softprops/action-gh-release@v1
|
||||
env:
|
||||
|
@ -179,4 +181,29 @@ jobs:
|
|||
files: |
|
||||
keyweave-*.tar.xz
|
||||
keyweave-*/keyweave.exe
|
||||
*SUMS*
|
||||
*SUMS*
|
||||
|
||||
- name: Create Homebrew inputs
|
||||
id: homebrew-inputs
|
||||
run: |
|
||||
sha256sums="{$(awk '{printf "%s '\''%s'\'': '\''%s'\''", (NR>1 ? "," : ""), $2, $1} END {print ""}' SHA256SUMS)}"
|
||||
echo "sha256sums=$sha256sums" >> $GITHUB_OUTPUT
|
||||
echo "version=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/github-script@v6
|
||||
name: Dispatch Homebrew release
|
||||
with:
|
||||
github-token: ${{ secrets.PAT_TOKEN }}
|
||||
script: |
|
||||
const sha256sums = JSON.parse('${{ steps.homebrew-inputs.outputs.sha256sums }}');
|
||||
|
||||
await github.rest.actions.createWorkflowDispatch({
|
||||
owner: 'bartvdbraak',
|
||||
repo: 'homebrew-keyweave',
|
||||
workflow_id: 'release.yml',
|
||||
ref: 'main',
|
||||
inputs: {
|
||||
version: '${{ steps.homebrew-inputs.outputs.version }}',
|
||||
sha256sums: JSON.stringify(sha256sums)
|
||||
}
|
||||
})
|
37
.github/workflows/trigger.yml
vendored
37
.github/workflows/trigger.yml
vendored
|
@ -1,37 +0,0 @@
|
|||
name: test trigger
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "feat/homebrew-releases"
|
||||
pull_request:
|
||||
branches:
|
||||
- "main"
|
||||
paths:
|
||||
- ".github/workflows/trigger.yml"
|
||||
|
||||
jobs:
|
||||
trigger:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id: setversion
|
||||
run: echo "version=$(grep -m1 -F 'version =' Cargo.toml | cut -d\" -f2)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.PAT_TOKEN }}
|
||||
script: |
|
||||
await github.rest.actions.createWorkflowDispatch({
|
||||
owner: 'bartvdbraak',
|
||||
repo: 'homebrew-keyweave',
|
||||
workflow_id: 'release.yml',
|
||||
ref: 'main',
|
||||
inputs: {
|
||||
version: '${{ steps.setversion.outputs.version }}',
|
||||
sha256sums: '5d486e110fed077ff9309814cc4bb205b50fa4263bad3d204e4d9f230002dd3c keyweave-aarch64-apple-darwin.tar.xz
|
||||
da415340276b6bc8f700e54cafdef23445973dba0d126065cf73135dff2c922d keyweave-aarch64-unsknown-linux-gnu.tar.xz
|
||||
45863c6d3f34bb7727cd112a0adfc20b840f4f5c92def99b9e15bde20e2a32f8 keyweave-armv7-unknown-linux-gnueabihf.tar.xz
|
||||
d88f646619d69f088fb2a1c223c7b1cf6199659fd593abc475851ddee866d4e9 keyweave-x86_64-apple-darwin.tar.xz
|
||||
79317c194bd41a2d9ec55e80353e3eb510a11e3c57708e65cc0a34966a86ae14 keyweave-x86_64-unknown-linux-gnu.tar.xz
|
||||
6f6ad0810a4bf75d914dd09c4c55efadc8b038d10811c4223b787ac5d1cf4186 keyweave-x86_64-unknown-linux-musl.tar.xz'
|
||||
}
|
||||
})
|
Loading…
Reference in a new issue