Skip to content

Commit cd762c0

Browse files
committed
refactor: uncomment and restore Scoop publishing configuration in GoReleaser
1 parent 38f0fb0 commit cd762c0

File tree

2 files changed

+33
-155
lines changed

2 files changed

+33
-155
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -60,156 +60,34 @@ jobs:
6060
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
6161
SCOOP_BUCKET_GITHUB_TOKEN: ${{ secrets.SCOOP_BUCKET_GITHUB_TOKEN }}
6262

63-
update-homebrew:
64-
name: Update Homebrew Formula
65-
runs-on: ubuntu-latest
66-
needs: [release]
67-
if: startsWith(github.ref, 'refs/tags/v')
68-
69-
steps:
70-
- name: Update Homebrew formula
71-
uses: mislav/bump-homebrew-formula-action@v3
72-
with:
73-
formula-name: gh-notif
74-
formula-path: Formula/gh-notif.rb
75-
homebrew-tap: ${{ github.repository_owner }}/homebrew-tap
76-
base-branch: main
77-
download-url: https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/gh-notif_${{ github.ref_name }}_darwin_amd64.tar.gz
78-
commit-message: |
79-
{{formulaName}} {{version}}
80-
81-
Created by https://github.com/mislav/bump-homebrew-formula-action
82-
env:
83-
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
84-
85-
update-scoop:
86-
name: Update Scoop Manifest
87-
runs-on: ubuntu-latest
88-
needs: [release]
89-
if: startsWith(github.ref, 'refs/tags/v')
90-
91-
steps:
92-
- name: Update Scoop manifest
93-
uses: ScoopInstaller/GithubActions@v1
94-
with:
95-
app: gh-notif
96-
bucket: ${{ github.repository_owner }}/scoop-bucket
97-
gh_token: ${{ secrets.SCOOP_BUCKET_GITHUB_TOKEN }}
98-
99-
publish-packages:
100-
name: Publish Packages
101-
runs-on: ubuntu-latest
102-
needs: [release]
103-
if: startsWith(github.ref, 'refs/tags/v')
104-
105-
steps:
106-
- name: Checkout code
107-
uses: actions/checkout@v4
108-
with:
109-
fetch-depth: 0
110-
111-
- name: Set up Go
112-
uses: actions/setup-go@v4
113-
with:
114-
go-version: ${{ env.GO_VERSION }}
115-
116-
- name: Install packaging tools
117-
run: |
118-
sudo apt-get update
119-
sudo apt-get install -y rpm
120-
121-
- name: Download release artifacts
122-
run: |
123-
gh release download ${{ github.ref_name }} --pattern "*.tar.gz" --pattern "*.zip"
124-
env:
125-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126-
127-
- name: Create Debian package
128-
run: |
129-
mkdir -p packaging/deb/gh-notif/DEBIAN
130-
mkdir -p packaging/deb/gh-notif/usr/bin
131-
mkdir -p packaging/deb/gh-notif/usr/share/man/man1
132-
133-
# Extract binary
134-
tar -xzf gh-notif_*_linux_amd64.tar.gz
135-
cp gh-notif packaging/deb/gh-notif/usr/bin/
136-
137-
# Copy man pages
138-
cp docs/man/*.1 packaging/deb/gh-notif/usr/share/man/man1/
139-
140-
# Create control file
141-
cat > packaging/deb/gh-notif/DEBIAN/control << EOF
142-
Package: gh-notif
143-
Version: ${GITHUB_REF_NAME#v}
144-
Section: utils
145-
Priority: optional
146-
Architecture: amd64
147-
Maintainer: gh-notif Contributors <noreply@github.com>
148-
Description: A high-performance CLI tool for managing GitHub notifications
149-
gh-notif helps you efficiently manage GitHub notifications with powerful
150-
filtering, sorting, and grouping capabilities.
151-
EOF
152-
153-
# Build package
154-
dpkg-deb --build packaging/deb/gh-notif
155-
mv packaging/deb/gh-notif.deb gh-notif_${GITHUB_REF_NAME#v}_amd64.deb
156-
157-
- name: Create RPM package
158-
run: |
159-
mkdir -p packaging/rpm/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
160-
161-
# Create spec file
162-
cat > packaging/rpm/SPECS/gh-notif.spec << EOF
163-
Name: gh-notif
164-
Version: ${GITHUB_REF_NAME#v}
165-
Release: 1%{?dist}
166-
Summary: A high-performance CLI tool for managing GitHub notifications
167-
168-
License: MIT
169-
URL: https://github.com/${{ github.repository }}
170-
Source0: gh-notif_%{version}_linux_amd64.tar.gz
171-
172-
BuildArch: x86_64
173-
174-
%description
175-
gh-notif helps you efficiently manage GitHub notifications with powerful
176-
filtering, sorting, and grouping capabilities.
177-
178-
%prep
179-
%setup -q -n gh-notif_%{version}_linux_amd64
180-
181-
%install
182-
mkdir -p %{buildroot}%{_bindir}
183-
mkdir -p %{buildroot}%{_mandir}/man1
184-
install -m 755 gh-notif %{buildroot}%{_bindir}/
185-
install -m 644 docs/man/*.1 %{buildroot}%{_mandir}/man1/
186-
187-
%files
188-
%{_bindir}/gh-notif
189-
%{_mandir}/man1/gh-notif*.1*
190-
191-
%changelog
192-
* $(date +'%a %b %d %Y') gh-notif Contributors <noreply@github.com> - ${GITHUB_REF_NAME#v}-1
193-
- Release ${GITHUB_REF_NAME#v}
194-
EOF
195-
196-
# Copy source
197-
cp gh-notif_*_linux_amd64.tar.gz packaging/rpm/SOURCES/
198-
199-
# Build RPM
200-
rpmbuild --define "_topdir $(pwd)/packaging/rpm" -ba packaging/rpm/SPECS/gh-notif.spec
201-
cp packaging/rpm/RPMS/x86_64/gh-notif-*.rpm .
202-
203-
- name: Upload packages to release
204-
run: |
205-
gh release upload ${{ github.ref_name }} *.deb *.rpm
206-
env:
207-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
# update-homebrew:
64+
# name: Update Homebrew Formula
65+
# runs-on: ubuntu-latest
66+
# needs: [release]
67+
# if: startsWith(github.ref, 'refs/tags/v')
68+
#
69+
# steps:
70+
# - name: Update Homebrew formula
71+
# uses: mislav/bump-homebrew-formula-action@v3
72+
# with:
73+
# formula-name: gh-notif
74+
# formula-path: Formula/gh-notif.rb
75+
# homebrew-tap: ${{ github.repository_owner }}/homebrew-tap
76+
# base-branch: main
77+
# download-url: https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/gh-notif_${{ github.ref_name }}_darwin_amd64.tar.gz
78+
# commit-message: |
79+
# {{formulaName}} {{version}}
80+
#
81+
# Created by https://github.com/mislav/bump-homebrew-formula-action
82+
# env:
83+
# COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
84+
85+
# Scoop publishing is now handled by GoReleaser directly
20886

20987
notify:
21088
name: Notify
21189
runs-on: ubuntu-latest
212-
needs: [release, update-homebrew, update-scoop, publish-packages]
90+
needs: [release]
21391
if: always()
21492

21593
steps:

.goreleaser.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,15 @@ release:
134134
# bin.install "gh-notif"
135135
# man1.install Dir["docs/man/*.1"]
136136

137-
# scoops:
138-
# - name: gh-notif
139-
# repository:
140-
# owner: "{{ .Env.GITHUB_REPOSITORY_OWNER }}"
141-
# name: scoop-bucket
142-
# token: "{{ .Env.SCOOP_BUCKET_GITHUB_TOKEN }}"
143-
# homepage: https://github.com/SharanRP/gh-notif
144-
# description: "A high-performance CLI tool for managing GitHub notifications"
145-
# license: MIT
137+
scoops:
138+
- name: gh-notif
139+
repository:
140+
owner: "{{ .Env.GITHUB_REPOSITORY_OWNER }}"
141+
name: scoop-bucket
142+
token: "{{ .Env.SCOOP_BUCKET_GITHUB_TOKEN }}"
143+
homepage: https://github.com/SharanRP/gh-notif
144+
description: "A high-performance CLI tool for managing GitHub notifications"
145+
license: MIT
146146

147147
nfpms:
148148
- id: packages

0 commit comments

Comments
 (0)