-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Updated github actions prod workflow to build desktop.
- Loading branch information
1 parent
48d012f
commit 31df0a0
Showing
1 changed file
with
43 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[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 | ||
|