Skip to content

Commit

Permalink
Improve build and check workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
raphtlw committed Jan 8, 2021
1 parent d9ff9a2 commit dec8733
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 15 deletions.
42 changes: 32 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
branches:
- prod
- main

jobs:
build:
Expand Down Expand Up @@ -56,11 +56,6 @@ jobs:
uses: actions/download-artifact@v2
with:
name: build
- name: Package
run: |
zip -r linux.zip deb/x64/*.deb rpm/x64/symbit*.rpm zip/linux/x64/*.zip
zip -r macos.zip zip/darwin/x64/*.zip *.dmg
zip -r windows.zip squirrel.windows/x64/*
- name: Create release
uses: actions/create-release@v1
id: create_release
Expand All @@ -77,24 +72,51 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: linux.zip
asset_path: ./zip/linux/x64/*.zip
asset_name: linux.zip
asset_content_type: application/zip
- name: Upload macOS package
- name: Upload debian package
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./deb/x64/*.deb
asset_name: debian.zip
asset_content_type: application/zip
- name: Upload rpm package
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: macos.zip
asset_path: ./rpm/x64/*.rpm
asset_name: debian.zip
asset_content_type: application/zip
- name: Upload macOS zip package
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./zip/darwin/x64/*.zip
asset_name: macos.zip
asset_content_type: application/zip
- name: Upload macOS dmg package
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./*.dmg
asset_name: macos.dmg
asset_content_type: application/zip
- name: Upload windows package
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: windows.zip
asset_path: ./squirrel.windows/x64/*
asset_name: windows.zip
asset_content_type: application/zip
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
on:
push:
branches:
- master
- prod
- main
- develop

jobs:
test:
Expand Down
6 changes: 3 additions & 3 deletions forge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ const linuxIcon = path.join(__dirname, 'public', 'icons', 'png', '512x512.png');
/** @type {import('@electron-forge/shared-types').ForgeConfig} */
module.exports = {
packagerConfig: {
executableName: 'app',
executableName: 'symbit',
},
makers: [
{
name: '@electron-forge/maker-squirrel',
config: { name: 'app', iconUrl: windowsIcon, setupIcon: windowsIcon },
config: { name: 'symbit', iconUrl: windowsIcon, setupIcon: windowsIcon },
},
{
name: '@electron-forge/maker-zip',
platforms: ['darwin'],
platforms: ['darwin', 'linux'],
},
{
name: '@electron-forge/maker-deb',
Expand Down

0 comments on commit dec8733

Please sign in to comment.