From 627e214a31e928e157b3fa99ed3bf5b1073c9c66 Mon Sep 17 00:00:00 2001 From: Phakin Kongkha Date: Thu, 8 May 2025 12:57:55 +0700 Subject: [PATCH 1/2] Remove needs from release workflow --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e1431df..d618c0d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,6 @@ on: jobs: release: name: Create Release - needs: [build-android, build-ios, build-macos, build-windows, build-linux] runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v4 From f217005a6c46d706cd9b05bf168ff1ebf654fcec Mon Sep 17 00:00:00 2001 From: Phakin Kongkha Date: Thu, 8 May 2025 13:19:20 +0700 Subject: [PATCH 2/2] No more release.yml, integrates into one --- .../{build.yml => build-and-release.yml} | 21 ++++++++++++- .github/workflows/release.yml | 30 ------------------- 2 files changed, 20 insertions(+), 31 deletions(-) rename .github/workflows/{build.yml => build-and-release.yml} (77%) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build-and-release.yml similarity index 77% rename from .github/workflows/build.yml rename to .github/workflows/build-and-release.yml index a72a069..ea2781f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build-and-release.yml @@ -1,4 +1,4 @@ -name: Build +name: Build and Release on: workflow_dispatch: @@ -86,3 +86,22 @@ jobs: with: name: linux-app path: build/linux/x64/release/bundle + release: + name: Create Release + if: ${{ github.ref == 'refs/heads/main' && startsWith(github.ref, 'refs/tags/v') }} + needs: [build-android, build-ios, build-macos, build-windows, build-linux] + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v4 + with: + path: artifacts + - uses: softprops/action-gh-release@v2 + with: + files: | + artifacts/android-apk/app-release.apk + artifacts/ios-app/Runner.app + artifacts/macos-app/VPNclient.app + artifacts/windows-app/VPNclient.exe + artifacts/linux-app/bundle/ + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index d618c0d..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Release - -on: - push: - workflow_run: - workflows: - - "Build" - types: [completed] - if: | - github.ref == 'refs/heads/main' && - startsWith(github.ref, 'refs/tags/v') - -jobs: - release: - name: Create Release - runs-on: ubuntu-latest - steps: - - uses: actions/download-artifact@v4 - with: - path: artifacts - - uses: softprops/action-gh-release@v1 - with: - files: | - artifacts/android-apk/app-release.apk - artifacts/ios-app/Runner.app - artifacts/macos-app/VPNclient.app - artifacts/windows-app/VPNclient.exe - artifacts/linux-app/bundle/ - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}