-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.89 KB
/
Copy pathrelease.yml
File metadata and controls
58 lines (49 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: "1.25"
- uses: goreleaser/goreleaser-action@v6
with:
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update Scoop manifest
run: |
VERSION="${GITHUB_REF_NAME#v}"
SHA256_ZENODO=$(grep 'zenodo-windows-amd64.exe' dist/checksums.txt | awk '{print $1}')
SHA256_MCP=$(grep 'zenodo-mcp-windows-amd64.exe' dist/checksums.txt | awk '{print $1}')
jq \
--arg ver "$VERSION" \
--arg hash_zenodo "$SHA256_ZENODO" \
--arg hash_mcp "$SHA256_MCP" \
'.version = $ver
| .architecture."64bit".url[0] = "https://github.com/ran-codes/zenodo-cli/releases/download/v\($ver)/zenodo-windows-amd64.exe"
| .architecture."64bit".url[1] = "https://github.com/ran-codes/zenodo-cli/releases/download/v\($ver)/zenodo-mcp-windows-amd64.exe"
| .architecture."64bit".hash[0] = $hash_zenodo
| .architecture."64bit".hash[1] = $hash_mcp' \
bucket/zenodo-cli.json > bucket/zenodo-cli.json.tmp
mv bucket/zenodo-cli.json.tmp bucket/zenodo-cli.json
- name: Commit updated Scoop manifest
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch origin main
git checkout main
git add bucket/zenodo-cli.json
git diff --cached --quiet && echo "No changes to commit" && exit 0
git commit -m "scoop: update manifest to v${GITHUB_REF_NAME#v}"
git push origin main