Skip to content

Commit

Permalink
feat(build): add windows build, add build to release
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyria committed Feb 24, 2023
1 parent a10f975 commit c674170
Show file tree
Hide file tree
Showing 38 changed files with 13,667 additions and 37 deletions.
70 changes: 60 additions & 10 deletions .github/workflows/release-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,63 @@ jobs:
draft: false
prerelease: false

# - name: Upload Binary
# id: uploadReleaseAsset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.createRelease.outputs.upload_url }}
# asset_path: ./release/Tsavorite.exe
# asset_name: Tsavorite.exe
# asset_content_type: application/vnd.microsoft.portable-executable
- name: Output Release URL File
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
- name: Save Release URL File for publish
uses: actions/upload-artifact@v1
with:
name: release_url
path: release_url.txt

publish-windows:
needs: [build]
name: Create Windows Binary

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [windows-latest]
node-version: [18]

steps:
- name: Load Release URL File from release job
uses: actions/download-artifact@v1
with:
name: release_url

- name: Get Release File Name & Upload URL
id: getReleaseInfo
run: |
echo ::set-output name=file_name::${REPOSITORY_NAME##*/}-${TAG_REF_NAME##*/v} # RepositoryName-v1.0.0
value=`cat release_url/release_url.txt`
echo ::set-output name=upload_url::$value
env:
TAG_REF_NAME: ${{ github.ref }}
REPOSITORY_NAME: ${{ github.repository }}

- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- run: npm install

- run: npm run load:content

- run: npm run lint

- run: npm run build:electron

- name: Upload Binary
id: uploadReleaseAsset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.getReleaseInfo.outputs.upload_url }}
asset_path: ./electron/out/make/squirrel.windows/x64/World Seller.exe
asset_name: World Seller.exe
asset_content_type: application/vnd.microsoft.portable-executable
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ testem.log
.DS_Store
Thumbs.db

# Electron
electron/node_modules
electron/www
out/

src/assets/content
version.json
src/assets/*.md
41 changes: 41 additions & 0 deletions electron/forge.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module.exports = {
packagerConfig: {
icon: './icons/icon'
},
rebuildConfig: {},
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {
icon: './icons/icon.ico',
setupIcon: './icons/icon.ico',
setupExe: 'World Seller.exe'
},
},
{
name: '@electron-forge/maker-zip',
platforms: ['darwin'],
},
{
name: '@electron-forge/maker-dmg',
config: {
icon: './icons/icon.icns',
icon: './icons/icon.icns',
},
},
{
name: '@electron-forge/maker-deb',
config: {
icon: './icons/icon.png',
setupIcon: './icons/icon.png',
},
},
{
name: '@electron-forge/maker-rpm',
config: {
icon: './icons/icon.png',
setupIcon: './icons/icon.png',
},
},
],
};
Binary file added electron/icons/icon.icns
Binary file not shown.
Binary file added electron/icons/icon.ico
Binary file not shown.
Binary file added electron/icons/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c674170

Please sign in to comment.