From e7fa2705681bb17b5e3a324dbc6b58fd4c29aa68 Mon Sep 17 00:00:00 2001 From: Naoki Ikeguchi Date: Mon, 16 Jan 2023 21:11:13 +0900 Subject: [PATCH] ci: Auto release to scoop --- .github/workflows/rust.yml | 18 +++++++++++++++++- resources/scoop/ghr.json.mustache | 16 ++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 resources/scoop/ghr.json.mustache diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c798ac5..19066e9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -149,7 +149,8 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: siketyan/release-to-registry-action@7e2a91ef78e61dccdb2e8b9401ae54ec58fab4fc + - name: Release to Homebrew Tap + uses: siketyan/release-to-registry-action@7e2a91ef78e61dccdb2e8b9401ae54ec58fab4fc with: path: 'Formula/ghr.rb' assets: |- @@ -165,3 +166,18 @@ jobs: branch: 'ghr/${{ github.event.release.tag_name }}' author: 'github-actions[bot] ' committer: 'github-actions[bot] ' + + - name: Release to Scoop Bucket + uses: siketyan/release-to-registry-action@7e2a91ef78e61dccdb2e8b9401ae54ec58fab4fc + with: + path: 'ghr.json' + assets: |- + windows_x86_64=ghr-x86_64-pc-windows-msvc.tar.gz + message: 'feat(ghr): Release ${{ github.event.release.tag_name }}' + template: './resources/scoop/ghr.json.mustache' + token: '${{ secrets.SCOOP_BUCKET_TOKEN }}' + hash: 'sha256' + targetRepo: 'scoop-bucket' + branch: 'ghr/${{ github.event.release.tag_name }}' + author: 'github-actions[bot] ' + committer: 'github-actions[bot] ' diff --git a/resources/scoop/ghr.json.mustache b/resources/scoop/ghr.json.mustache new file mode 100644 index 0000000..a073d33 --- /dev/null +++ b/resources/scoop/ghr.json.mustache @@ -0,0 +1,16 @@ +{ + "version": "{{tag_without_v}}", + "description": "Yet another repository management with auto-attaching profiles", + "homepage": "https://github.com/siketyan/ghr", + "license": { + "identifier": "MIT", + "url": "https://github.com/siketyan/ghr/blob/main/LICENCE.md" + }, + "architecture": { + "64bit": { + "url": "{{{assets.windows_x86_64.browser_download_url}}}", + "hash": "{{assets.windows_x86_64.hash}}" + } + }, + "bin": "ghr.exe" +}