|
75 | 75 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
76 | 76 | run: npx semantic-release |
77 | 77 |
|
78 | | - desktop-build: |
79 | | - name: Build Desktop Apps |
80 | | - needs: release |
81 | | - runs-on: ${{ matrix.os }} |
82 | | - if: github.event_name == 'push' && github.ref == 'refs/heads/main' |
83 | | - |
84 | | - strategy: |
85 | | - matrix: |
86 | | - include: |
87 | | - - os: windows-latest |
88 | | - platform: win |
89 | | - artifact: exe |
90 | | - - os: macos-latest |
91 | | - platform: mac |
92 | | - artifact: dmg |
93 | | - - os: ubuntu-latest |
94 | | - platform: linux |
95 | | - artifact: AppImage |
96 | | - |
97 | | - steps: |
98 | | - - name: Checkout |
99 | | - uses: actions/checkout@v4 |
100 | | - |
101 | | - - uses: pnpm/action-setup@v2 |
102 | | - with: |
103 | | - version: 9 |
104 | | - |
105 | | - - name: Setup Node.js |
106 | | - uses: actions/setup-node@v4 |
107 | | - with: |
108 | | - node-version: '20' |
109 | | - cache: 'pnpm' |
110 | | - |
111 | | - - name: Install dependencies |
112 | | - run: pnpm install --frozen-lockfile |
113 | | - |
114 | | - - name: Build web app |
115 | | - run: pnpm build |
116 | | - |
117 | | - - name: Install desktop dependencies |
118 | | - run: cd apps/desktop && npm install |
119 | | - |
120 | | - - name: Build desktop app |
121 | | - run: cd apps/desktop && npm run build:${{ matrix.platform }} |
122 | | - |
123 | | - - name: List generated files |
124 | | - run: | |
125 | | - echo "=== Contents of apps/desktop/dist ===" |
126 | | - ls -la apps/desktop/dist/ || echo "Directory not found" |
127 | | - echo "=== All .exe files ===" |
128 | | - find apps/desktop -name "*.exe" || echo "No .exe files found" |
129 | | - echo "=== All .dmg files ===" |
130 | | - find apps/desktop -name "*.dmg" || echo "No .dmg files found" |
131 | | - echo "=== All .AppImage files ===" |
132 | | - find apps/desktop -name "*.AppImage" || echo "No .AppImage files found" |
133 | | - shell: bash |
134 | | - |
135 | | - - name: Get current version |
136 | | - id: current_version |
137 | | - run: | |
138 | | - VERSION=$(grep -o "[0-9]\+\.[0-9]\+\.[0-9]\+" src/constants/version.ts) |
139 | | - echo "tag=v$VERSION" >> $GITHUB_OUTPUT |
140 | | - shell: bash |
141 | | - |
142 | | - - name: Upload artifacts to current release |
143 | | - uses: softprops/action-gh-release@v1 |
144 | | - with: |
145 | | - tag_name: ${{ steps.current_version.outputs.tag }} |
146 | | - files: | |
147 | | - apps/desktop/dist/*.exe |
148 | | - apps/desktop/dist/*.dmg |
149 | | - apps/desktop/dist/*.AppImage |
150 | | - env: |
151 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments