From 13c63cdfaf9985000ce13280312756e62b189047 Mon Sep 17 00:00:00 2001 From: Toby Date: Thu, 19 Oct 2023 20:07:30 -0700 Subject: [PATCH] ci: upload releases to download.hysteria.network --- .github/workflows/release.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8c9b7c9..05bc489 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }}