Repository navigation
68 lines (63 loc) · 2.63 KB
/
Copy pathinstallers.yml
File metadata and controls
68 lines (63 loc) · 2.63 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
name: Installers
# Serves the current install scripts at the production URLs the README names,
# https://anoma.ly/hex/files/install-linux.sh and install-windows.ps1, from
# the hex-production-files bucket. Those keys held the 2.3.1 installers;
# nothing reads them but people following install instructions (the 2.3.1
# updaters read the feeds and appcast, which stay frozen). The installers read
# the release service, so they install the stable release, or the newest dev
# build until there is one.
#
# The installers live in the locked .github/release/ (CODEOWNERS: Dax), so a
# change to them needs Dax's review. check runs their tests without secrets;
# publish runs in the release environment, checks out only .github/release/
# at the same commit, and uploads the installers from there as data with
# .github/release/r2-put.sh.
on:
push:
branches: [dev]
paths:
- .github/release/install-linux.sh
- .github/release/install-windows.ps1
workflow_dispatch:
permissions:
contents: read
concurrency:
group: installers
cancel-in-progress: false
jobs:
check:
if: github.ref == 'refs/heads/dev'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Test the installers
run: |
sh scripts/test-install-linux-release.sh
pwsh -NoProfile -Command "[void][ScriptBlock]::Create((Get-Content -Raw .github/release/install-windows.ps1))"
publish:
needs: check
runs-on: ubuntu-24.04
environment: release
env:
HEX_RELEASE_BUCKET: hex-production-files
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.sha }}
sparse-checkout: /.github/release/
sparse-checkout-cone-mode: false
persist-credentials: false
- name: Upload them
env:
R2_ACCESS_KEY_ID: ${{ vars.R2_ACCESS_KEY_ID }}
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
run: |
in=.github/release
sh .github/release/r2-put.sh install-linux.sh "$in/install-linux.sh" text/x-shellscript "public, max-age=300"
sh .github/release/r2-put.sh install-windows.ps1 "$in/install-windows.ps1" "text/plain; charset=utf-8" "public, max-age=300"
for name in install-linux.sh install-windows.ps1; do
curl -fsS -H 'Cache-Control: no-cache' "https://anoma.ly/hex/files/$name?check=$GITHUB_RUN_ID" | cmp - "$in/$name"
echo "https://anoma.ly/hex/files/$name is the current installer." >> "$GITHUB_STEP_SUMMARY"
done