diff --git a/.github/workflows/node-ci.prod.yml b/.github/workflows/node-ci.prod.yml index f10762d3..e729e975 100644 --- a/.github/workflows/node-ci.prod.yml +++ b/.github/workflows/node-ci.prod.yml @@ -163,9 +163,40 @@ jobs: name: ${{ github.event.repository.name }}-server path: server/dist + build-desktop: + runs-on: windows-latest + needs: + - bump-version + - build + steps: + - name: Access repository + uses: actions/checkout@v2 + with: + ref: ${{ needs.bump-version.outputs.commit_sha }} + - name: Ensure commits from bump-version + run: git pull + - uses: ./.github/actions/cache + - uses: actions/download-artifact@v2 + with: + name: ${{ github.event.repository.name }}-client + path: client/dist + - uses: actions/download-artifact@v2 + with: + name: ${{ github.event.repository.name }}-server + path: server/dist + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Build desktop + run: yarn build:desktop + - name: Upload desktop build artifact + uses: actions/upload-artifact@v2 + with: + name: ${{ github.event.repository.name }}-desktop + path: desktop/dist + check-github-release: runs-on: ubuntu-latest - needs: build + needs: build-desktop outputs: defined: ${{ steps.release.outputs.defined == 'true' }} steps: @@ -188,34 +219,26 @@ jobs: uses: actions/checkout@v2 with: ref: ${{ needs.bump-version.outputs.commit_sha }} - - name: Download artifact - uses: actions/download-artifact@v2 + - name: Ensure commits from bump-version + run: git pull + - uses: actions/download-artifact@v2 with: - name: ${{ github.event.repository.name }} - path: dist + name: ${{ github.event.repository.name }}-desktop + path: desktop/dist - name: Compress artifact to zip uses: papeloto/action-zip@v1 with: files: dist dest: "${{ github.event.repository.name }}-${{ needs.bump-version.outputs.version }}.zip" - - name: Create a GitHub release - id: release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create Github release with desktop exe + uses: softprops/action-gh-release@v1 with: + name: Release ${{ needs.bump-version.outputs.tag_version }} tag_name: ${{ needs.bump-version.outputs.tag_version }} - release_name: Release ${{ needs.bump-version.outputs.tag_version }} body: ${{ needs.bump-version.outputs.changelog }} - - name: Upload zip file to release - uses: actions/upload-release-asset@v1.0.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.release.outputs.upload_url }} - asset_path: "${{ github.event.repository.name }}-${{ needs.bump-version.outputs.version }}.zip" - asset_name: "${{ github.event.repository.name }}-${{ needs.bump-version.outputs.version }}.zip" - asset_content_type: application/zip + files: | + desktop/dist/*.exe + desktop/dist/*.dmg check-npm-token: runs-on: ubuntu-latest