ci: upload releases to download.hysteria.network

This commit is contained in:
Toby 2023-10-19 20:07:30 -07:00
parent dfa95811e8
commit 13c63cdfaf

View file

@ -16,6 +16,10 @@ jobs:
- name: Check out
uses: actions/checkout@v4
- name: Get version
id: get_version
run: echo "version=$(git describe --tags --always --match 'app/v*' | sed -n 's|app/\([^/-]*\)\(-.*\)\{0,1\}|\1|p')" >> $GITHUB_OUTPUT
- name: Setup Go
uses: actions/setup-go@v4
with:
@ -46,11 +50,20 @@ jobs:
sha256sum $file >> build/hashes.txt
done
- name: Upload
- name: Upload GitHub
uses: softprops/action-gh-release@v1
with:
files: build/*
- name: Upload CF bucket
uses: shallwefootball/upload-s3-action@v1.3.3
with:
aws_key_id: ${{ secrets.CF_KEY_ID }}
aws_secret_access_key: ${{ secrets.CF_KEY }}
aws_bucket: "https://bea223c61d5a41250d127bd67f51dfec.r2.cloudflarestorage.com/hydownload"
source_dir: "build"
destination_dir: "app/{{ steps.get_version.outputs.version }}"
- name: Publish to API
run: |
export HY_API_POST_KEY=${{ secrets.HY2_API_POST_KEY }}