Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub actions workflow for making a release #1218

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[{*.yml,*.yaml}]
indent_size = 2
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Release

on:
workflow_dispatch:

jobs:
release:
name: Release for ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- kind: linux
os: ubuntu-latest
platform: linux
- kind: windows
os: windows-latest
platform: win
steps:
- uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
# The talk on the street says this might be a good version for building.
node-version: 14.20.1
cache: yarn

- name: Install Yarn dependencies
run: yarn install --frozen-lockfile

- if: matrix.platform == 'linux'
name: Install bsdtar # Required by electron-builder when targeting pacman.
run: |
sudo apt-get update -y
sudo apt-get install -y libarchive-tools
- name: Release project
id: build
uses: StarUbiquitous/command-output@v1.0.1
with:
run: yarn publish-${{ matrix.platform }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- if: steps.build.outputs.stderr != ''
name: Log stderr
continue-on-error: true
run: echo '${{ steps.build.outputs.stderr }}'

# Creating Electron executables can in some cases fail with exit code 0.
# Check the output of build step for obvious signs of failure.
- if: contains(steps.build.outputs.stderr, '[FAIL]')
name: Check STDERR for trouble
uses: actions/github-script@v6
with:
script: core.setFailed('It seems the build process failed silently. See previous step for more info.')
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"build-linux": "quasar build --mode electron -T linux",
"build-osx": "quasar build --mode electron -T mac",
"publish": "quasar build --mode electron --publish always",
"publish-win": "quasar build --mode electron -T win32 --publish always",
"publish-linux": "quasar build --mode electron -T linux --publish always",
"test:unit": "jest --updateSnapshot",
"test:unit:ci": "jest --ci",
"test:unit:coverage": "jest --coverage",
Expand Down
5 changes: 5 additions & 0 deletions quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ module.exports = configure(function(/* ctx */) {
provider: 'github'
}
},
linux: {
publish: {
provider: 'github'
}
},

// transpile: false,

Expand Down