|
27 | 27 | SHOULD_PUBLISH_ALPHA: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release') && contains(github.ref, '-alpha.') }}
|
28 | 28 |
|
29 | 29 | jobs:
|
| 30 | + create_draft_release: |
| 31 | + runs-on: ubuntu-latest |
| 32 | + env: |
| 33 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 34 | + steps: |
| 35 | + - name: Get version tag from package.json |
| 36 | + id: get_version |
| 37 | + # only run this on "push" to "master" or alpha releases |
| 38 | + if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }} |
| 39 | + run: | |
| 40 | + version=$(node -p "require('./package.json').version") |
| 41 | + echo "VERSION_TAG=$version" >> "$GITHUB_OUTPUT" |
| 42 | + - name: Upload changes to draft release |
| 43 | + # only run this on "push" to "master" or alpha releases |
| 44 | + if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }} |
| 45 | + uses: ncipollo/release-action@v1 |
| 46 | + with: |
| 47 | + tag: v${{ steps.get_version.outputs.VERSION_TAG }} |
| 48 | + name: 'Session ${{ steps.get_version.outputs.VERSION_TAG }}' |
| 49 | + draft: true |
| 50 | + bodyFile: ${{ env.SHOULD_PUBLISH_ALPHA == 'true' && 'build/release-notes-alpha.md' || 'build/release-notes.md' }} |
| 51 | + allowUpdates: true |
| 52 | + omitNameDuringUpdate: true |
| 53 | + omitBodyDuringUpdate: true |
| 54 | + replacesArtifacts: true |
| 55 | + updateOnlyUnreleased: true |
| 56 | + |
30 | 57 | build_linux:
|
31 | 58 | runs-on: ubuntu-22.04
|
| 59 | + needs: [create_draft_release] |
32 | 60 | strategy:
|
33 | 61 | fail-fast: false
|
34 | 62 | matrix:
|
@@ -156,6 +184,7 @@ jobs:
|
156 | 184 |
|
157 | 185 | build_windows:
|
158 | 186 | runs-on: windows-2022
|
| 187 | + needs: [create_draft_release] |
159 | 188 | env:
|
160 | 189 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
161 | 190 | steps:
|
@@ -193,6 +222,7 @@ jobs:
|
193 | 222 | # We want both arm64 and intel mac builds, and according to this https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources macos-14 and above is always arm64 and macos-13 is the last intel runner
|
194 | 223 | # NOTE x64 builds made on an arm64 host will not bundle the native modules correctly https://github.com/electron-userland/electron-builder/issues/8646
|
195 | 224 | build_mac_arm64:
|
| 225 | + needs: [create_draft_release] |
196 | 226 | runs-on: macos-14
|
197 | 227 | env:
|
198 | 228 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@@ -224,6 +254,7 @@ jobs:
|
224 | 254 |
|
225 | 255 | build_mac_x64:
|
226 | 256 | runs-on: macos-13
|
| 257 | + needs: [create_draft_release] |
227 | 258 | env:
|
228 | 259 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
229 | 260 | MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE }}
|
|
0 commit comments