Created
December 1, 2019 14:03
-
-
Save NoelDavies/858a89214fcb8cae575f7ef0219fa31b to your computer and use it in GitHub Desktop.
.github/workflow/app-build.yml
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
name: Electron Build | |
on: [push] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macOS-10.14, macos-latest, windows-latest, ubuntu-18.04] | |
steps: | |
- name: Context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- uses: actions/checkout@v1 | |
with: | |
fetch-depth: 1 | |
- name: Use Node.js 10.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 10.x | |
- name: yarn install | |
run: | | |
yarn install | |
- name: Publish | |
run: | | |
yarn run build | |
- name: Cleanup artifacts (win) | |
if: contains(matrix.os, 'windows') | |
run: | | |
npx rimraf "build/!(*.exe)" | |
- name: Move extra build files into release archives | |
run: | | |
mv changelog.md build/changelog.md | |
mv release_readme.txt build/release.txt | |
mv release_upgrade.txt build/upgrade.txt | |
- name: Cleanup artifacts (nix) | |
run: | | |
npx rimraf "build/!(*.exe|*.deb|*.AppImage|*.dmg)" | |
if: contains(matrix.os, 'windows') == false | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v1 | |
with: | |
name: ${{ matrix.os }} | |
path: build | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: "build/**" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment