chore: desktop workflow
This commit is contained in:
50
.github/workflows/desktop.release.test.yml
vendored
50
.github/workflows/desktop.release.test.yml
vendored
@@ -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/**
|
||||
|
||||
|
||||
30
.github/workflows/desktop.release.yml
vendored
30
.github/workflows/desktop.release.yml
vendored
@@ -17,6 +17,7 @@ jobs:
|
||||
- run: yarn build:web:all
|
||||
|
||||
Mac:
|
||||
if: true == false
|
||||
runs-on: macos-latest
|
||||
needs: build
|
||||
defaults:
|
||||
@@ -27,6 +28,8 @@ jobs:
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- run: yarn install
|
||||
- run: yarn build:web:all
|
||||
- name: Compile Mac
|
||||
run: yarn run webpack --config desktop.webpack.prod.js
|
||||
- name: MacX64
|
||||
@@ -39,9 +42,10 @@ jobs:
|
||||
uses: actions/upload-artifact@v3.0.0
|
||||
with:
|
||||
name: assets
|
||||
path: 'packages/desktop/dist/'
|
||||
path: 'packages/desktop/dist/*+(.snap|.AppImage|.yml|.yaml|.blockmap|.deb|.dmg|.zip|.exe)'
|
||||
|
||||
Linux:
|
||||
if: true == false
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
defaults:
|
||||
@@ -52,6 +56,8 @@ jobs:
|
||||
- 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
|
||||
@@ -100,7 +106,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v3.0.0
|
||||
with:
|
||||
name: assets
|
||||
path: 'packages/desktop/dist/'
|
||||
path: 'packages/desktop/dist/*+(.snap|.AppImage|.yml|.yaml|.blockmap|.deb|.dmg|.zip|.exe)'
|
||||
|
||||
Windows:
|
||||
runs-on: windows-latest
|
||||
@@ -113,6 +119,8 @@ jobs:
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- run: yarn install
|
||||
- run: yarn build:web:all
|
||||
- run: yarn run webpack --config desktop.webpack.prod.js
|
||||
- run: yarn run electron-builder --windows --x64 --ia32 --publish=never
|
||||
|
||||
@@ -120,7 +128,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v3.0.0
|
||||
with:
|
||||
name: assets
|
||||
path: 'packages/desktop/dist/'
|
||||
path: 'packages/desktop/dist/*+(.snap|.AppImage|.yml|.yaml|.blockmap|.deb|.dmg|.zip|.exe)'
|
||||
|
||||
Publish:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -138,5 +146,19 @@ jobs:
|
||||
name: assets
|
||||
path: packages/desktop/dist
|
||||
- run: node scripts/sums.mjs
|
||||
- run: node scripts/create-draft-release.mjs
|
||||
- name: get-npm-version
|
||||
id: package-version
|
||||
uses: martinbeentjes/npm-get-version-action@main
|
||||
with:
|
||||
path: packages/desktop
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
token: ${{ secrets.CI_PAT_TOKEN }}
|
||||
tag_name: "@standardnotes/desktop@${{ steps.package-version.outputs.current-version}}"
|
||||
prerelease: true
|
||||
draft: true
|
||||
name: "Desktop ${{ steps.package-version.outputs.current-version}}"
|
||||
files: |
|
||||
packages/desktop/dist/*
|
||||
- run: node scripts/publishSnap.mjs
|
||||
|
||||
Reference in New Issue
Block a user