1+ name : 🐬 Fetch Releases 🐬
2+ concurrency :
3+ group : " ${{ github.workflow }}-${{ github.ref }}"
4+ cancel-in-progress : true
5+
6+ on :
7+ workflow_dispatch :
8+ schedule :
9+ - cron : " 0 */6 * * *" # Every 06 Hrs
10+ jobs :
11+ fetch-sync :
12+ runs-on : ${{ matrix.runner }}
13+ timeout-minutes : 20
14+ permissions :
15+ attestations : write
16+ contents : write
17+ id-token : write
18+ packages : write
19+ statuses : read
20+ strategy :
21+ matrix :
22+ include :
23+ - title : " astral-glibc"
24+ script : " ${GITHUB_WORKSPACE}/main/fetch_astral_glibc.sh"
25+ arch : " aarch64"
26+ file : " /tmp/python-astral-glibc.tar"
27+ runner : " ubuntu-24.04-arm"
28+
29+ - title : " astral-glibc"
30+ script : " ${GITHUB_WORKSPACE}/main/fetch_astral_glibc.sh"
31+ arch : " x86_64"
32+ file : " /tmp/python-astral-glibc.tar"
33+ runner : " ubuntu-latest"
34+
35+ # No musl builds yet
36+ # - title: "astral-musl"
37+ # script: "${GITHUB_WORKSPACE}/main/fetch_astral_musl.sh"
38+ # arch: "aarch64"
39+ # file: "/tmp/python-astral-musl.tar"
40+ # runner: "ubuntu-24.04-arm"
41+
42+ - title : " astral-musl"
43+ script : " ${GITHUB_WORKSPACE}/main/fetch_astral_musl.sh"
44+ arch : " x86_64"
45+ file : " /tmp/python-astral-musl.tar"
46+ runner : " ubuntu-latest"
47+
48+ steps :
49+ - name : Checkout repository
50+ uses : actions/checkout@v4
51+ with :
52+ path : main
53+ fetch-depth : " 1"
54+ filter : " blob:none"
55+
56+ - name : Setup Env
57+ run : |
58+ #presets
59+ set +x ; set +e
60+ #-------------#
61+ ##CoreUtils
62+ sudo apt update -y
63+ sudo apt install bc coreutils curl dos2unix fdupes jq moreutils wget -y
64+ sudo apt-get install apt-transport-https apt-utils ca-certificates coreutils dos2unix gnupg2 jq moreutils p7zip-full rename rsync software-properties-common texinfo tmux util-linux wget -y 2>/dev/null ; sudo apt-get update -y 2>/dev/null
65+ #Git
66+ sudo apt-get install git-lfs -y -qq
67+ echo "GH_PAGER=" >> "${GITHUB_ENV}"
68+ gh config set prompt disabled
69+ #tmp
70+ SYSTMP="$(dirname $(mktemp -u))" && export SYSTMP="${SYSTMP}"
71+ echo "SYSTMP=${SYSTMP}" >> "${GITHUB_ENV}"
72+ #-------------#
73+ ##User-Agent
74+ USER_AGENT="$(curl -qfsSL 'https://pub.ajam.dev/repos/Azathothas/Wordlists/Misc/User-Agents/ua_chrome_macos_latest.txt')" && export USER_AGENT="${USER_AGENT}"
75+ echo "USER_AGENT=${USER_AGENT}" >> "${GITHUB_ENV}"
76+ continue-on-error : true
77+
78+ - name : Install Addons
79+ run : |
80+ #presets
81+ set +x ; set +e
82+ #-------------#
83+ bash <(curl -qfsSL "https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Linux/install_bins_curl.sh")
84+ continue-on-error : true
85+
86+ - name : Fetch (${{ matrix.title }}/${{ matrix.arch }})
87+ env :
88+ GHCR_TOKEN : " ${{ github.token }}"
89+ GITHUB_TOKEN : " ${{ github.token }}"
90+ run : |
91+ #presets
92+ set +x ; set +e
93+ #-------------#
94+ dos2unix --quiet "${{ matrix.script }}"
95+ chmod +x "${{ matrix.script }}"
96+ bash "${{ matrix.script }}"
97+ continue-on-error : true
98+
99+ - name : Check
100+ run : |
101+ #presets
102+ set +x ; set +e
103+ #-------------#
104+ if [[ -s "${{ matrix.file }}" ]] && [[ $(stat -c%s "${{ matrix.file }}") -gt 1000 ]]; then
105+ export HAS_RELEASE="TRUE"
106+ echo "HAS_RELEASE=${HAS_RELEASE}" >> "${GITHUB_ENV}"
107+ UTC_TIME="$(TZ='UTC' date +'%Y_%m_%d')"
108+ echo "UTC_TIME=${UTC_TIME}" >> "${GITHUB_ENV}"
109+ else
110+ export HAS_RELEASE="FALSE"
111+ echo "HAS_RELEASE=${HAS_RELEASE}" >> "${GITHUB_ENV}"
112+ fi
113+ continue-on-error : true
114+
115+ - name : Fail (If Create Failed)
116+ if : env.HAS_RELEASE == 'FALSE'
117+ run : |
118+ #presets
119+ set +x ; set +e
120+ #-------------#
121+ exit 1
122+ continue-on-error : false
123+
124+ # Artifacts
125+ - name : Upload (Build) Artifacts
126+ if : env.HAS_RELEASE == 'TRUE'
127+ uses : actions/upload-artifact@v4
128+ with :
129+ name : " ARTIFACTS-${{ matrix.title }}_${{ matrix.arch }}"
130+ path : |
131+ ${{ matrix.file }}
132+ compression-level : 0 # no compression, [Default: 6 (GNU Gzip)]
133+ retention-days : 90 # max
134+ overwrite : true
135+ continue-on-error : true
136+
137+ # continuous
138+ - name : Releaser (Continuous)
139+ if : env.HAS_RELEASE == 'TRUE'
140+ uses : softprops/action-gh-release@v2.2.1
141+ with :
142+ name : " Continuous ${{ matrix.title }}_${{ matrix.arch }}"
143+ tag_name : " ${{ matrix.title }}_${{ matrix.arch }}"
144+ prerelease : true
145+ draft : false
146+ generate_release_notes : false
147+ body_path : " /tmp/RELEASE_NOTE.md"
148+ files : |
149+ ${{ matrix.file }}
150+ continue-on-error : true
151+
152+ # Snapshot
153+ - name : Releaser (Snapshot)
154+ if : env.HAS_RELEASE == 'TRUE'
155+ uses : softprops/action-gh-release@v2.2.1
156+ with :
157+ name : " Snapshot-(${{ matrix.title }}_${{ matrix.arch }}_${{ env.UTC_TIME }}"
158+ tag_name : " ${{ matrix.title }}_${{ matrix.arch }}_${{ env.UTC_TIME }}"
159+ prerelease : false
160+ draft : false
161+ generate_release_notes : false
162+ make_latest : false
163+ body_path : " /tmp/RELEASE_NOTE.md"
164+ files : |
165+ ${{ matrix.file }}
166+ continue-on-error : true
167+
168+ # Build Provenance
169+ - name : Attest Build Provenance
170+ if : env.HAS_RELEASE == 'TRUE'
171+ uses : actions/attest-build-provenance@v2.2.0
172+ with :
173+ subject-name : " ${{ matrix.title }}-${{ matrix.arch }}"
174+ subject-path : ${{ matrix.file }}
175+ show-summary : true
176+ continue-on-error : true
0 commit comments