Skip to content

Commit 49fafda

Browse files
committed
feature: winget & scoop auto-release workflows
1 parent e0f1cee commit 49fafda

3 files changed

Lines changed: 37 additions & 36 deletions

File tree

.github/workflows/release.yml

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ jobs:
105105
files: artifacts/*
106106
generate_release_notes: true
107107

108-
# TODO: Enable after first manual submission to microsoft/winget-pkgs is accepted
109108
# publish-winget:
110109
# name: Publish to WinGet
111110
# needs: release
@@ -114,39 +113,41 @@ jobs:
114113
# - name: Submit to WinGet
115114
# uses: vedantmgoyal9/winget-releaser@v2
116115
# with:
117-
# identifier: madLinux7.dstimer
116+
# identifier: madLinux.dstimer
118117
# installers-regex: 'dstimer-windows-x86_64\.exe$'
119118
# token: ${{ secrets.WINGET_TOKEN }}
120119

121-
# TODO: Enable when ready for Scoop distribution
122-
# update-scoop:
123-
# name: Update Scoop manifest
124-
# needs: release
125-
# runs-on: ubuntu-latest
126-
# steps:
127-
# - uses: actions/checkout@v4
128-
#
129-
# - name: Download Windows artifact
130-
# uses: actions/download-artifact@v4
131-
# with:
132-
# name: dstimer-windows-x86_64.exe
133-
# path: artifacts
134-
#
135-
# - name: Update Scoop manifest
136-
# run: |
137-
# VERSION="${GITHUB_REF_NAME#v}"
138-
# SHA256=$(sha256sum artifacts/dstimer-windows-x86_64.exe | cut -d' ' -f1)
139-
# cd pkg/scoop
140-
# jq --arg v "$VERSION" --arg h "$SHA256" \
141-
# '.version = $v |
142-
# .architecture."64bit".url = "https://github.com/madLinux7/dstimer/releases/download/v\($v)/dstimer-windows-x86_64.exe#/dstimer.exe" |
143-
# .architecture."64bit".hash = $h' \
144-
# dstimer.json > dstimer.json.tmp && mv dstimer.json.tmp dstimer.json
145-
#
146-
# - name: Commit updated manifest
147-
# run: |
148-
# git config user.name "github-actions[bot]"
149-
# git config user.email "github-actions[bot]@users.noreply.github.com"
150-
# git add pkg/scoop/dstimer.json
151-
# git diff --cached --quiet || git commit -m "chore: update Scoop manifest to ${GITHUB_REF_NAME}"
152-
# git push
120+
update-scoop:
121+
name: Update Scoop bucket
122+
needs: release
123+
runs-on: ubuntu-latest
124+
steps:
125+
- name: Checkout scoop-bucket repo
126+
uses: actions/checkout@v4
127+
with:
128+
repository: madLinux7/scoop-bucket
129+
token: ${{ secrets.SCOOP_TOKEN }}
130+
131+
- name: Download Windows artifact
132+
uses: actions/download-artifact@v4
133+
with:
134+
name: dstimer-windows-x86_64.exe
135+
path: artifacts
136+
137+
- name: Update Scoop manifest
138+
run: |
139+
VERSION="${GITHUB_REF_NAME#v}"
140+
SHA256=$(sha256sum artifacts/dstimer-windows-x86_64.exe | cut -d' ' -f1)
141+
jq --arg v "$VERSION" --arg h "$SHA256" \
142+
'.version = $v |
143+
.architecture."64bit".url = "https://github.com/madLinux7/dead-simple-cli-timer/releases/download/v\($v)/dstimer-windows-x86_64.exe#/dstimer.exe" |
144+
.architecture."64bit".hash = $h' \
145+
bucket/dstimer.json > bucket/dstimer.json.tmp && mv bucket/dstimer.json.tmp bucket/dstimer.json
146+
147+
- name: Commit and push
148+
run: |
149+
git config user.name "github-actions[bot]"
150+
git config user.email "github-actions[bot]@users.noreply.github.com"
151+
git add bucket/dstimer.json
152+
git diff --cached --quiet || git commit -m "Update dstimer to ${GITHUB_REF_NAME}"
153+
git push

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dstimer"
3-
version = "1.0.4"
3+
version = "1.0.5"
44
edition = "2021"
55
description = "A dead-simple, cross-platform CLI countdown timer with color-changing progress bar and optional audio playback"
66
license = "MIT"

0 commit comments

Comments
 (0)