File tree Expand file tree Collapse file tree
packages/codingcode/test/ci Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ permissions:
99 contents : write
1010
1111jobs :
12- release :
12+ build :
1313 strategy :
1414 fail-fast : false
1515 matrix :
4343 - name : Build Electron app
4444 run : pnpm --filter @codingcode/desktop run build
4545
46- - name : Package & publish
47- run : pnpm --filter @codingcode/desktop exec electron-builder --${{ matrix.platform }} --publish always
46+ - name : Package (no publish)
47+ run : pnpm --filter @codingcode/desktop exec electron-builder --${{ matrix.platform }} --publish never
48+
49+ - name : Upload build artifacts
50+ uses : actions/upload-artifact@v4
51+ with :
52+ name : dist-${{ matrix.platform }}
53+ path : |
54+ packages/desktop/dist/*.exe
55+ packages/desktop/dist/*.exe.blockmap
56+ packages/desktop/dist/*.yml
57+ packages/desktop/dist/*.dmg
58+ packages/desktop/dist/*.zip
59+ packages/desktop/dist/*.AppImage
60+ if-no-files-found : warn
61+
62+ release :
63+ needs : build
64+ runs-on : ubuntu-latest
65+ steps :
66+ - name : Checkout
67+ uses : actions/checkout@v4
68+
69+ - name : Download all artifacts
70+ uses : actions/download-artifact@v4
71+ with :
72+ path : assets
73+ merge-multiple : true
74+
75+ - name : Create GitHub Release and upload assets
4876 env :
4977 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
78+ run : |
79+ gh release create "${{ github.ref_name }}" \
80+ --title "${{ github.ref_name }}" \
81+ --generate-notes \
82+ assets/*
Original file line number Diff line number Diff line change @@ -49,7 +49,9 @@ describe('CI tooling configuration', () => {
4949 expect ( content ) . toContain ( 'permissions:' ) ;
5050 expect ( content ) . toContain ( 'contents: write' ) ;
5151 expect ( content ) . toContain ( 'GH_TOKEN' ) ;
52- expect ( content ) . toContain ( '--publish always' ) ;
52+ expect ( content ) . toContain ( '--publish never' ) ;
53+ expect ( content ) . toContain ( 'gh release create' ) ;
54+ expect ( content ) . toContain ( 'needs: build' ) ;
5355 } ) ;
5456
5557 it ( 'electron-builder.yml has publish config for GitHub Releases' , ( ) => {
You can’t perform that action at this time.
0 commit comments