Skip to content

workflows: release-test: add test workflow #1

workflows: release-test: add test workflow

workflows: release-test: add test workflow #1

Workflow file for this run

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"