diff --git a/.github/workflows/desktop_release.yml b/.github/workflows/desktop_release.yml new file mode 100644 --- /dev/null +++ b/.github/workflows/desktop_release.yml @@ -0,0 +1,34 @@ +name: Create a new release with macOS/ Windows artifacts + +on: + push: + tags: + - desktop-** + +jobs: + windows-build: + uses: ./.github/workflows/windows_ci.yml + macos-build: + uses: ./.github/workflows/macos_ci.yml + release: + name: Release + runs-on: ubuntu-latest + needs: [windows-build, macos-build] + permissions: + contents: write + steps: + - name: Download + uses: actions/download-artifact@v3 + + - name: Release + id: release + uses: softprops/action-gh-release@v1 + with: + prerelease: true + fail_on_unmatched_files: true + files: | + windows-artifacts/**/* + macos-artifacts/**/* + + - name: Add link to Summary + run: echo "${{ steps.release.outputs.url }}" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/macos_ci.yml b/.github/workflows/macos_ci.yml --- a/.github/workflows/macos_ci.yml +++ b/.github/workflows/macos_ci.yml @@ -1,6 +1,7 @@ name: macOS Build CI on: + workflow_call: push: branches: [master] paths-ignore: @@ -62,3 +63,11 @@ - name: Clean up keychain if: ${{ always() }} run: security delete-keychain $RUNNER_TEMP/app-signing.keychain-db + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: macos-artifacts + path: ./desktop/out/make/**/* + if-no-files-found: error + retention-days: 1 diff --git a/.github/workflows/windows_ci.yml b/.github/workflows/windows_ci.yml --- a/.github/workflows/windows_ci.yml +++ b/.github/workflows/windows_ci.yml @@ -1,6 +1,7 @@ name: Windows build CI on: + workflow_call: push: branches: [master] paths-ignore: @@ -38,3 +39,11 @@ WINDOWS_PASSWORD: ${{secrets.WINDOWS_PASSWORD}} working-directory: './desktop' run: yarn make + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: windows-artifacts + path: ./desktop/out/make/**/* + if-no-files-found: error + retention-days: 1