Skip to content

Commit c51dc82

Browse files
fix(release): update environment variable references for package publishing steps
1 parent 4a51adb commit c51dc82

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ jobs:
7676
publish-packages:
7777
needs: release
7878
runs-on: ubuntu-latest
79+
env:
80+
SCOOP_BUCKET_TOKEN: ${{ secrets.SCOOP_BUCKET_TOKEN }}
81+
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
82+
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
83+
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
84+
AUR_SSH_PRIVATE_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
7985

8086
steps:
8187
- uses: actions/checkout@v4
@@ -163,9 +169,9 @@ jobs:
163169

164170
# ── Scoop ───────────────────────────────────────────────
165171
- name: Publish to Scoop bucket
166-
if: ${{ secrets.SCOOP_BUCKET_TOKEN != '' }}
172+
if: env.SCOOP_BUCKET_TOKEN != ''
167173
run: |
168-
git clone "https://x-access-token:${{ secrets.SCOOP_BUCKET_TOKEN }}@github.com/fasterinnerlooper/scoop-bucket.git" scoop-bucket
174+
git clone "https://x-access-token:$SCOOP_BUCKET_TOKEN@github.com/fasterinnerlooper/scoop-bucket.git" scoop-bucket
169175
cp rendered/scoop/mdterm.json scoop-bucket/bucket/
170176
cd scoop-bucket
171177
git config user.name "github-actions[bot]"
@@ -177,20 +183,20 @@ jobs:
177183

178184
# ── Chocolatey ──────────────────────────────────────────
179185
- name: Publish to Chocolatey
180-
if: ${{ secrets.CHOCOLATEY_API_KEY != '' }}
186+
if: env.CHOCOLATEY_API_KEY != ''
181187
run: |
182188
sudo apt-get update && sudo apt-get install -y mono-devel nuget
183189
nuget pack rendered/chocolatey/mdterm.nuspec -OutputDirectory rendered/chocolatey
184190
nuget push rendered/chocolatey/mdterm.*.nupkg \
185191
-Source "https://push.chocolatey.org/" \
186-
-ApiKey "${{ secrets.CHOCOLATEY_API_KEY }}"
192+
-ApiKey "$CHOCOLATEY_API_KEY"
187193
continue-on-error: true
188194

189195
# ── Homebrew ────────────────────────────────────────────
190196
- name: Publish to Homebrew tap
191-
if: ${{ secrets.HOMEBREW_TAP_TOKEN != '' }}
197+
if: env.HOMEBREW_TAP_TOKEN != ''
192198
run: |
193-
git clone "https://x-access-token:${{ secrets.HOMEBREW_TAP_TOKEN }}@github.com/fasterinnerlooper/homebrew-tap.git" homebrew-tap
199+
git clone "https://x-access-token:$HOMEBREW_TAP_TOKEN@github.com/fasterinnerlooper/homebrew-tap.git" homebrew-tap
194200
cp rendered/homebrew/mdterm.rb homebrew-tap/Formula/
195201
cd homebrew-tap
196202
git config user.name "github-actions[bot]"
@@ -202,14 +208,14 @@ jobs:
202208

203209
# ── Snap Store ──────────────────────────────────────────
204210
- name: Prepare Snap build
205-
if: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS != '' }}
211+
if: env.SNAPCRAFT_STORE_CREDENTIALS != ''
206212
run: mkdir -p snap && cp packaging/snap/snapcraft.yaml snap/snapcraft.yaml
207213
- name: Build Snap package
208-
if: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS != '' }}
214+
if: env.SNAPCRAFT_STORE_CREDENTIALS != ''
209215
id: snap_build
210216
uses: snapcore/action-build@v1
211217
- name: Publish to Snap Store
212-
if: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS != '' }}
218+
if: env.SNAPCRAFT_STORE_CREDENTIALS != ''
213219
uses: snapcore/action-publish@v1
214220
with:
215221
store: stable
@@ -221,7 +227,7 @@ jobs:
221227

222228
# ── AUR ─────────────────────────────────────────────────
223229
- name: Publish to AUR
224-
if: ${{ secrets.AUR_SSH_PRIVATE_KEY != '' }}
230+
if: env.AUR_SSH_PRIVATE_KEY != ''
225231
uses: KSXGitHub/github-actions-deploy-aur@v4.1.1
226232
with:
227233
pkgname: mdterm

0 commit comments

Comments
 (0)