Repository navigation
199 lines (169 loc) · 5.2 KB
/
Copy pathrelease.yml
File metadata and controls
199 lines (169 loc) · 5.2 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
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag:
description: Existing release tag to publish or retry
required: true
type: string
concurrency:
group: release-${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
cancel-in-progress: false
permissions:
contents: read
env:
RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
jobs:
build:
name: Validate and package
runs-on: ubuntu-latest
steps:
- name: Check out release tag
uses: actions/checkout@v7
with:
ref: ${{ env.RELEASE_TAG }}
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Regenerate theme families
run: npm run build
- name: Reject generated-file drift
run: git diff --exit-code -- themes zed/themes warp ghostty
- name: Validate release
run: npm run validate:release -- "${RELEASE_TAG#v}"
- name: Package VSIX
run: npm run package
- name: Verify VSIX
run: |
unzip -t hearth-latest.vsix
sha256sum hearth-latest.vsix | tee hearth-latest.vsix.sha256
- name: Upload release artifact
uses: actions/upload-artifact@v7
with:
name: hearth-vsix
path: |
hearth-latest.vsix
hearth-latest.vsix.sha256
if-no-files-found: error
retention-days: 30
zed-extension:
name: Update Zed extension
needs: build
runs-on: ubuntu-latest
steps:
- name: Open Zed extension update PR
uses: huacnlee/zed-extension-action@v2
with:
extension-name: hearth-theme
zed-extensions: zed-industries/extensions
push-to: ryanfurrer/extensions
env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
github-release:
name: Publish GitHub Release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download release artifact
uses: actions/download-artifact@v8
with:
name: hearth-vsix
- name: Create or update release
env:
GH_TOKEN: ${{ github.token }}
run: |
if gh release view "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
gh release upload "$RELEASE_TAG" \
hearth-latest.vsix \
hearth-latest.vsix.sha256 \
--clobber \
--repo "$GITHUB_REPOSITORY"
else
gh release create "$RELEASE_TAG" \
hearth-latest.vsix \
hearth-latest.vsix.sha256 \
--generate-notes \
--latest \
--title "Hearth $RELEASE_TAG" \
--repo "$GITHUB_REPOSITORY"
fi
marketplace:
name: Publish Visual Studio Marketplace
needs: build
runs-on: ubuntu-latest
steps:
- name: Check out release tag
uses: actions/checkout@v7
with:
ref: ${{ env.RELEASE_TAG }}
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Download release artifact
uses: actions/download-artifact@v8
with:
name: hearth-vsix
- name: Require Marketplace credentials
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: test -n "$VSCE_PAT"
# Azure DevOps global PATs retire on December 1, 2026. Migrate this job
# to `vsce publish --azure-credential` before then.
- name: Publish to Marketplace
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: npm exec -- vsce publish --packagePath hearth-latest.vsix --skip-duplicate
open-vsx:
name: Publish Open VSX
needs: build
runs-on: ubuntu-latest
steps:
- name: Check out release tag
uses: actions/checkout@v7
with:
ref: ${{ env.RELEASE_TAG }}
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Download release artifact
uses: actions/download-artifact@v8
with:
name: hearth-vsix
- name: Require Open VSX credentials
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: test -n "$OVSX_PAT"
- name: Publish to Open VSX
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: npm exec -- ovsx publish hearth-latest.vsix --skip-duplicate
refresh-landing-page:
name: Refresh Hearth landing page
needs: github-release
runs-on: ubuntu-latest
steps:
- name: Require Vercel deploy hook
env:
PORTFOLIO_DEPLOY_HOOK: ${{ secrets.PORTFOLIO_DEPLOY_HOOK }}
run: test -n "$PORTFOLIO_DEPLOY_HOOK"
- name: Trigger production rebuild
env:
PORTFOLIO_DEPLOY_HOOK: ${{ secrets.PORTFOLIO_DEPLOY_HOOK }}
run: curl --fail --silent --show-error --request POST "$PORTFOLIO_DEPLOY_HOOK"