File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 pull_request :
55 branches : [ main ]
66 workflow_dispatch :
7+ workflow_call :
78
89jobs :
910 build :
Original file line number Diff line number Diff line change 1+ name : release-test
2+
3+ on :
4+ push :
5+ branches : [ ci ]
6+ workflow_dispatch :
7+
8+ jobs :
9+ build :
10+ uses : ./.github/workflows/build.yaml
11+
12+ release :
13+ needs : build
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Download artefact
17+ uses : actions/download-artifact@v4
18+ with :
19+ name : installer-build
20+ path : releases/.
21+
22+ - name : Set up env
23+ run : |
24+ echo "BURL=https://storage.bunnycdn.com/asahilinux/installer-test" >> $GITHUB_ENV
25+ echo "RELEASE_PKG=releases/installer-$(cat releases/latest).tar.gz" >> $GITHUB_ENV
26+
27+ - name : Push to Bunny
28+ run : |
29+ if [ ! -e "${RELEASE_PKG}" ]; then
30+ echo "Package not found!"
31+ exit 1
32+ fi
33+
34+ upload() {
35+ curl -# --fail --request PUT \
36+ --url "${2}" \
37+ -H "AccessKey: ${{ secrets.BUNNY_TOKEN }}" \
38+ -H "Content-Type: ${3}" \
39+ -H "Accept: application/json" \
40+ --data-binary @${1}
41+ }
42+
43+ upload "${RELEASE_PKG}" "${BURL}${RELEASE_PKG/releases/}" "application/octet-stream"
44+ upload "releases/latest" "${BURL}/latest" "text/plain"
You can’t perform that action at this time.
0 commit comments