Skip to content

Commit

Permalink
fix: Updated github actions prod workflow to build desktop.
Browse files Browse the repository at this point in the history
  • Loading branch information
KvelaGorrrrnio committed Mar 9, 2022
1 parent 48d012f commit 31df0a0
Showing 1 changed file with 43 additions and 20 deletions.
63 changes: 43 additions & 20 deletions .github/workflows/node-ci.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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/[email protected]
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
Expand Down

0 comments on commit 31df0a0

Please sign in to comment.