From 3341295fc1b8bc07e005e11ac4ee98a01ef22cd4 Mon Sep 17 00:00:00 2001 From: Joooye_34 Date: Fri, 29 Dec 2023 17:00:10 +0800 Subject: [PATCH] ci: temporarily save release from branch to affine-releases (#5455) --- .github/workflows/release-desktop.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml index 51c046585c..da59b42a4e 100644 --- a/.github/workflows/release-desktop.yml +++ b/.github/workflows/release-desktop.yml @@ -353,10 +353,10 @@ jobs: env: RELEASE_VERSION: ${{ needs.before-make.outputs.RELEASE_VERSION }} - name: Create Release Draft + if: ${{ github.ref_type == 'tag' }} uses: softprops/action-gh-release@v1 with: name: ${{ needs.before-make.outputs.RELEASE_VERSION }} - tag_name: ${{ (github.ref_type == 'tag' && github.ref_name) || needs.before-make.outputs.RELEASE_VERSION }} body: '' draft: ${{ github.event.inputs.is-draft }} prerelease: ${{ github.event.inputs.is-pre-release }} @@ -368,3 +368,25 @@ jobs: ./*.AppImage ./*.apk ./*.yml + - name: Create Nightly Release Draft + if: ${{ github.ref_type == 'branch' }} + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + with: + # Temporarily, treat release from branch as nightly release, artifact saved to AFFiNE-Releases. + # Need to improve internal build and nightly release logic. + repository: 'toeverything/AFFiNE-Releases' + name: ${{ needs.before-make.outputs.RELEASE_VERSION }} + tag_name: ${{ needs.before-make.outputs.RELEASE_VERSION }} + body: '' + draft: false + prerelease: true + files: | + ./VERSION + ./*.zip + ./*.dmg + ./*.exe + ./*.AppImage + ./*.apk + ./*.yml