chore: desktop workflow

This commit is contained in:
Mo
2022-06-12 09:54:36 -05:00
parent 884dc81a54
commit decb94f6e5
4 changed files with 80 additions and 49 deletions

View File

@@ -4,8 +4,35 @@ on:
workflow_dispatch:
jobs:
Release:
Linux:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/desktop
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- uses: actions/setup-node@v2
with:
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn build:web:all
- name: Compile for AppImage
run: yarn run webpack --config desktop.webpack.prod.js
- name: AppImage
run: yarn run electron-builder --linux --x64 --ia32 -c.linux.target=AppImage --publish=never
- name: Upload
uses: actions/upload-artifact@v3.0.0
with:
name: assets
path: 'packages/desktop/dist/'
Publish:
runs-on: ubuntu-latest
needs: [Linux]
defaults:
run:
working-directory: packages/desktop
@@ -14,20 +41,23 @@ jobs:
- uses: actions/setup-node@v2
with:
registry-url: 'https://registry.npmjs.org'
- run: mkdir files
- run: echo Foo >> files/foo.txt
- run: echo Bar >> files/bar.txt
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@main
- uses: actions/download-artifact@v3
with:
path: packages/desktop
name: assets
path: packages/desktop/dist
- run: node scripts/sums.mjs
- name: 'Get Previous tag'
id: previous_tag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 1.0.0
- name: Release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.CI_PAT_TOKEN }}
tag_name: "@standardnotes/desktop@${{ steps.package-version.outputs.current-version}}"
tag_name: ${{steps.previous_tag.outputs.tag}}
prerelease: true
draft: true
files: |
packages/desktop/files/*
packages/desktop/dist/**