Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
KitScrobbler/.github/workflows/release.yml at develop · mountainash/KitScrobbler · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mountainash
KitScrobbler
Repository navigation
Code
Issues
2
(2)
Pull requests
3
(3)
Discussions
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
develop
Breadcrumbs
KitScrobbler
/
.github
/
workflows
/
release.yml
Copy path
View runs
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
126 lines (108 loc) · 4.11 KB
develop
Breadcrumbs
KitScrobbler
/
.github
/
workflows
/
release.yml
Copy path
Top
File metadata and controls
Code
Blame
126 lines (108 loc) · 4.11 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name
:
Release
#
Publishing a tag (v1.2.3) builds the Safari extension, packages it, and opens a
#
draft GitHub release carrying that build and the commits since the previous
#
version — nothing goes live until it is published by hand.
on
:
push
:
tags
:
-
"
v*
"
jobs
:
build
:
runs-on
:
ubuntu-latest
permissions
:
contents
:
read
steps
:
-
uses
:
actions/checkout@v4
with
:
#
`src/web-scrobbler` is the upstream submodule; the build has nothing
#
to work with without it.
submodules
:
recursive
-
uses
:
oven-sh/setup-bun@v2
with
:
bun-version
:
1.4.2
#
matches the `packageManager` field
#
The build takes its version from package.json, so a tag that disagrees
#
with it publishes an extension that reports the wrong version — which is
#
exactly what v1.0.0 did, tagged before the version was bumped.
-
name
:
Check the tag matches package.json
env
:
TAG
:
${{ github.ref_name }}
run
:
|
set -euo pipefail
version=$(bun -e 'console.log((await Bun.file("package.json").json()).version)')
if [ "${TAG#v}" != "$version" ]; then
echo "::error::Tag $TAG does not match package.json version $version. Bump the version and re-tag, so the build and the release agree."
exit 1
fi
echo "Tag $TAG matches package.json version $version."
#
Installs Kit's dependencies and, via the postinstall hook, the
#
submodule's own.
-
name
:
Install dependencies
run
:
bun install --frozen-lockfile
-
name
:
Type-check and lint
run
:
bun run check
#
The toolbar icons are rendered by a headless browser, which the runner
#
image provides on PATH as `google-chrome`. `build:release` leaves out the
#
popup state gallery, so the zip carries only what a user needs.
-
name
:
Build the extension
run
:
bun run build:release
-
name
:
Package the extension
env
:
TAG
:
${{ github.ref_name }}
run
:
|
cd build/preview
zip -r "../../KitScrobbler-$TAG.zip" .
-
uses
:
actions/upload-artifact@v4
with
:
name
:
KitScrobbler-${{ github.ref_name }}
path
:
KitScrobbler-${{ github.ref_name }}.zip
if-no-files-found
:
error
release
:
needs
:
build
runs-on
:
ubuntu-latest
permissions
:
contents
:
write
#
to create the release
steps
:
#
Full history and tags, so the notes can find the previous release.
-
uses
:
actions/checkout@v4
with
:
fetch-depth
:
0
fetch-tags
:
true
-
uses
:
actions/download-artifact@v4
with
:
name
:
KitScrobbler-${{ github.ref_name }}
path
:
dist
#
Every commit since the last version tag, short ref linked to the full one.
-
name
:
Write the release notes
env
:
TAG
:
${{ github.ref_name }}
run
:
|
set -euo pipefail
# The nearest version tag behind the commit being released, so the list
# is right even if tags are not published in version order.
previous=$(git describe --tags --abbrev=0 --match 'v*' "$TAG^" 2>/dev/null || true)
if [ -n "$previous" ]; then
range="$previous..$TAG"
heading="Changes since $previous"
else
range="$TAG"
heading="First release"
fi
{
echo "## $heading"
echo
git log "$range" --pretty=format:"- [\`%h\`](https://github.com/$GITHUB_REPOSITORY/commit/%H) %s"
echo
} > release-notes.md
cat release-notes.md
#
A draft, so the notes and the attached build can be reviewed before
#
anything is published. Publish it (or delete and re-tag to regenerate)
#
from the Releases page.
-
name
:
Draft the release
env
:
GH_TOKEN
:
${{ github.token }}
TAG
:
${{ github.ref_name }}
run
:
|
gh release create "$TAG" "dist/KitScrobbler-$TAG.zip" \
--title "$TAG" \
--notes-file release-notes.md \
--draft
You can’t perform that action at this time.