Skip to content

Commit

Permalink
Add release system
Browse files Browse the repository at this point in the history
  • Loading branch information
Jbithell committed Mar 1, 2024
1 parent 1c4d865 commit ef504df
Show file tree
Hide file tree
Showing 5 changed files with 266 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/electron-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ on:
branches: ["Gen2"]
push:
branches: ["Gen2"]
release:
types: ["created"]

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
generateClientCode:
uses: ./.github/workflows/build-client.yml
Expand All @@ -29,7 +31,7 @@ jobs:
with:
node-version: 18
cache: npm
cache-dependency-path: '**/package-lock.json'
cache-dependency-path: "**/package-lock.json"
- run: npm install
- if: matrix.os == 'windows-latest'
uses: microsoft/[email protected]
Expand All @@ -39,9 +41,15 @@ jobs:
name: client-dist
path: ./server/public
- run: npm run make
if: github.event_name != 'release'
- uses: actions/upload-artifact@v3
if: github.event_name != 'release'
with:
name: package-${{ matrix.os }}
path: ./server/out/make/**/*.*
retention-days: 20
if-no-files-found: error
if-no-files-found: error
- run: npm run publish
if: github.event_name == 'release' && github.event.action == 'created'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Updating

- Bump package.json version for client & server
- Commit to gen2 branch and push
- Create and publish a new release
- (Github action will add files to release)
12 changes: 12 additions & 0 deletions server/forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { MakerSquirrel } from "@electron-forge/maker-squirrel";
import { MakerZIP } from "@electron-forge/maker-zip";
import { MakerDeb } from "@electron-forge/maker-deb";
import { VitePlugin } from "@electron-forge/plugin-vite";
import { PublisherGithub } from "@electron-forge/publisher-github";

const config: ForgeConfig = {
packagerConfig: {
Expand Down Expand Up @@ -40,6 +41,17 @@ const config: ForgeConfig = {
],
}),
],
publishers: [
new PublisherGithub({
repository: {
owner: "bstudios",
name: "cueb",
},
prerelease: false,
draft: false,
tagPrefix: "v",
}),
],
};

export default config;
235 changes: 235 additions & 0 deletions server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@electron-forge/plugin-auto-unpack-natives": "^7.2.0",
"@electron-forge/plugin-vite": "^7.2.0",
"@types/better-sqlite3": "^7.6.9",
"@electron-forge/publisher-github": "^7.3.0",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
Expand Down

0 comments on commit ef504df

Please sign in to comment.