dbgate/.github/workflows/build-app-beta.yaml

86 lines
2.3 KiB
YAML
Raw Normal View History

2021-01-23 09:33:20 +00:00
name: Electron app
on:
push:
2021-04-23 18:58:36 +00:00
tags:
2021-01-23 09:37:44 +00:00
- 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
2021-01-23 09:33:20 +00:00
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
2021-04-23 18:58:36 +00:00
# os: [ubuntu-18.04, windows-2016]
os: [macOS-10.14, windows-2016, ubuntu-18.04]
2021-01-23 09:33:20 +00:00
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: setCurrentVersion
run: |
yarn setCurrentVersion
- name: fillNativeModulesElectron
run: |
yarn fillNativeModulesElectron
2021-01-23 10:02:56 +00:00
- name: Install Snapcraft
if: matrix.os == 'ubuntu-18.04'
uses: samuelmeuli/action-snapcraft@v1
2021-01-23 09:33:20 +00:00
- name: Publish
run: |
yarn run build:app
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish
WIN_CSC_LINK: ${{ secrets.WINCERT_CERTIFICATE }}
WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_PASSWORD }}
2021-01-23 10:02:56 +00:00
- name: Save snap login
if: matrix.os == 'ubuntu-18.04'
run: 'echo "$SNAPCRAFT_LOGIN" > snapcraft.login'
shell: bash
env:
SNAPCRAFT_LOGIN: ${{secrets.SNAPCRAFT_LOGIN}}
- name: publishSnap
if: matrix.os == 'ubuntu-18.04'
run: |
snapcraft login --with snapcraft.login
snapcraft upload --release=beta app/dist/*.snap
2021-01-23 09:33:20 +00:00
- name: Copy artifacts
run: |
mkdir artifacts
mv app/dist/*.exe artifacts/ || true
mv app/dist/*.AppImage artifacts/ || true
mv app/dist/*.deb artifacts/ || true
2021-01-23 10:02:56 +00:00
mv app/dist/*.snap artifacts/ || true
2021-04-23 19:01:58 +00:00
mv app/dist/*.dmg artifacts/ || true
2021-01-23 09:33:20 +00:00
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.os }}
path: artifacts
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: 'artifacts/**'
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}