-
-
Notifications
You must be signed in to change notification settings - Fork 118
44 lines (37 loc) · 1.17 KB
/
release-test.yaml
File metadata and controls
44 lines (37 loc) · 1.17 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
name: release-test
on:
push:
branches: [ ci ]
workflow_dispatch:
jobs:
build:
uses: ./.github/workflows/build.yaml
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artefact
uses: actions/download-artifact@v4
with:
name: installer-build
path: releases/.
- name: Set up env
run: |
echo "BURL=https://storage.bunnycdn.com/asahilinux/installer-test" >> $GITHUB_ENV
echo "RELEASE_PKG=releases/installer-$(cat releases/latest).tar.gz" >> $GITHUB_ENV
- name: Push to Bunny
run: |
if [ ! -e "${RELEASE_PKG}" ]; then
echo "Package not found!"
exit 1
fi
upload() {
curl -# --fail --request PUT \
--url "${2}" \
-H "AccessKey: ${{ secrets.BUNNY_TOKEN }}" \
-H "Content-Type: ${3}" \
-H "Accept: application/json" \
--data-binary @${1}
}
upload "${RELEASE_PKG}" "${BURL}/${RELEASE_PKG}" "application/octet-stream"
upload "releases/latest" "${BURL}/latest" "text/plain"