From 99b583aa185b8b38661db7595a0c80a3e30b0f11 Mon Sep 17 00:00:00 2001 From: Ash Manning Date: Mon, 11 Mar 2024 18:39:19 +0800 Subject: [PATCH] automate release assets --- .github/workflows/check_lint_build.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check_lint_build.yaml b/.github/workflows/check_lint_build.yaml index b7216c7..da19bb7 100644 --- a/.github/workflows/check_lint_build.yaml +++ b/.github/workflows/check_lint_build.yaml @@ -59,7 +59,7 @@ jobs: - name: 'Set filename for release binary' run: | pushd "target/release" - ln -s "thunder_app" "${OUTPUT_FILENAME}" + ln -fs "thunder_app" "${OUTPUT_FILENAME}" popd - name: 'Upload Artifacts (thunder)' @@ -68,6 +68,16 @@ jobs: name: ${{ env.OUTPUT_FILENAME }} path: target/release/${{ env.OUTPUT_FILENAME }} if-no-files-found: error + + - name: Release + uses: softprops/action-gh-release@v2.0.2 + if: startsWith(github.ref, 'refs/tags/') + permissions: + contents: write + with: + files: target/release/${{ env.OUTPUT_FILENAME }} + fail_on_unmatched_files: true + draft: true build-macos: name: Build (macos-x86_64) @@ -104,7 +114,7 @@ jobs: - name: 'Set filename for release binary' run: | pushd "target/release" - ln -s "thunder_app" "${OUTPUT_FILENAME}" + ln -fs "thunder_app" "${OUTPUT_FILENAME}" popd - name: 'Upload Artifacts (thunder)' @@ -155,7 +165,7 @@ jobs: - name: 'Set filename for release binary' run: | pushd "target/x86_64-pc-windows-gnu/release" - ln -s "thunder_app.exe" "${OUTPUT_FILENAME}" + ln -fs "thunder_app.exe" "${OUTPUT_FILENAME}" popd - name: 'Upload Artifacts (thunder)'