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 e1431df..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,31 +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 - 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@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 }}