5353 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5454
5555 publish-apps :
56- name : Publish Apps (${{ matrix.os }} - ${{ matrix.arch }})
56+ name : Build Apps (${{ matrix.os }} - ${{ matrix.arch }})
5757 needs : release
58- if : |
59- needs.release.outputs.published == 'true' ||
60- github.event.inputs.forcePublish == 'true'
6158 runs-on : ${{ matrix.os }}
6259 strategy :
6360 matrix :
@@ -84,30 +81,14 @@ jobs:
8481 - name : Install dependencies
8582 run : pnpm install
8683
87- - name : Get Version
88- id : get_version
89- shell : bash
90- run : |
91- VERSION=$(node -p "require('./apps/desktop/package.json').version")
92- echo "VERSION=$VERSION" >> $GITHUB_ENV
93- echo "version=$VERSION" >> $GITHUB_OUTPUT
94-
95- IS_PRERELEASE="false"
96- if [[ $VERSION == *"-"* ]] || [[ ${{ github.event_name }} == "workflow_dispatch" && ${{ github.event.inputs.prerelease }} == "true" ]] || [[ ${{ github.ref_name }} == "feature/monorepo" ]]; then
97- IS_PRERELEASE="true"
98- fi
99-
100- echo "PRERELEASE=$IS_PRERELEASE" >> $GITHUB_ENV
101- echo "prerelease=$IS_PRERELEASE" >> $GITHUB_OUTPUT
102-
10384 - name : Import Apple Code Signing Certificate
10485 uses : apple-actions/import-codesign-certs@v3
10586 if : matrix.os == 'macos-latest'
10687 with :
10788 p12-file-base64 : ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
10889 p12-password : ${{ secrets.CERTIFICATE_OSX_APPLICATION_PASSWORD }}
10990
110- - name : Build, Package & Publish
91+ - name : Build & Package
11192 env :
11293 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
11394 SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
@@ -118,14 +99,59 @@ jobs:
11899 APPLE_ID : ${{ secrets.APPLE_ID }}
119100 APPLE_ID_PASSWORD : ${{ secrets.APPLE_ID_PASSWORD }}
120101 APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
121- run : pnpm turbo publish --filter=@pipelab/app -- --arch ${{ matrix.arch }}
102+ run : pnpm turbo make --filter=@pipelab/app -- --arch ${{ matrix.arch }}
103+
104+ - name : Upload Desktop Artifacts
105+ uses : actions/upload-artifact@v4
106+ with :
107+ name : desktop-artifacts-${{ matrix.os }}-${{ matrix.arch }}
108+ path : apps/desktop/out/make/**/*
122109
123- - name : Upload Agent Binary to Release
110+ - name : Upload CLI Artifacts
124111 if : matrix.arch == 'x64'
112+ uses : actions/upload-artifact@v4
113+ with :
114+ name : cli-artifacts-${{ matrix.os }}-${{ matrix.arch }}
115+ path : apps/cli/bin/*
116+
117+ deploy :
118+ name : Deploy Release
119+ needs : [release, publish-apps]
120+ if : |
121+ needs.release.outputs.published == 'true' ||
122+ github.event.inputs.forcePublish == 'true'
123+ runs-on : ubuntu-latest
124+ steps :
125+ - uses : actions/checkout@v4
126+
127+ - name : Download all artifacts
128+ uses : actions/download-artifact@v4
129+ with :
130+ path : artifacts
131+
132+ - name : Get Version
133+ id : get_version
134+ shell : bash
135+ run : |
136+ VERSION=$(node -p "require('./apps/desktop/package.json').version")
137+ echo "VERSION=$VERSION" >> $GITHUB_ENV
138+ echo "version=$VERSION" >> $GITHUB_OUTPUT
139+
140+ IS_PRERELEASE="false"
141+ if [[ $VERSION == *"-"* ]] || [[ ${{ github.event_name }} == "workflow_dispatch" && ${{ github.event.inputs.prerelease }} == "true" ]] || [[ ${{ github.ref_name }} == "feature/monorepo" ]]; then
142+ IS_PRERELEASE="true"
143+ fi
144+
145+ echo "PRERELEASE=$IS_PRERELEASE" >> $GITHUB_ENV
146+ echo "prerelease=$IS_PRERELEASE" >> $GITHUB_OUTPUT
147+
148+ - name : Create Release and Upload
125149 uses : softprops/action-gh-release@v2
126150 with :
127- tag_name : " v${{ env.VERSION }}"
128- prerelease : ${{ env.PRERELEASE == 'true' }}
129- files : apps/cli/bin/*
151+ tag_name : " v${{ steps.get_version.outputs.version }}"
152+ prerelease : ${{ steps.get_version.outputs.prerelease == 'true' }}
153+ files : |
154+ artifacts/desktop-artifacts-*/**/*
155+ artifacts/cli-artifacts-*/*
130156 env :
131157 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments