chore: reusable desktop workflow

This commit is contained in:
Mo
2022-06-13 17:10:08 -05:00
parent 927f6dec58
commit 81b1626fbd
4 changed files with 41 additions and 7 deletions

15
.github/workflows/desktop.beta.prod.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
name: Desktop Beta Release
on:
push:
branches: [ develop ]
paths:
- packages/desktop/**
workflow_dispatch:
jobs:
call-reusable-build:
uses: standardnotes/app/.github/workflows/desktop.release.reuse.yml@develop
secrets: inherit
with:
channel: beta

View File

@@ -0,0 +1,15 @@
name: Desktop Prod Release
on:
push:
branches: [ main ]
paths:
- packages/desktop/**
workflow_dispatch:
jobs:
call-reusable-build:
uses: standardnotes/app/.github/workflows/desktop.release.reuse.yml@main
secrets: inherit
with:
channel: prod

View File

@@ -1,11 +1,11 @@
name: Desktop Release
on:
push:
branches: [ develop, main ]
paths:
- packages/desktop/**
workflow_dispatch:
workflow_call:
inputs:
channel:
required: true
type: string
jobs:
Mac:
@@ -111,7 +111,11 @@ jobs:
packages/desktop/dist/*.yaml
Windows:
runs-on: windows-latest
if: ${{ inputs.channel == 'prod' }}
runs-on: self-hosted
env:
WINDOWS_TOKEN_ALIAS: ${{ secrets.WINDOWS_TOKEN_ALIAS }}
WINDOWS_TOKEN_PASSWORD: ${{ secrets.WINDOWS_TOKEN_PASSWORD }}
defaults:
run:
working-directory: packages/desktop
@@ -163,7 +167,7 @@ jobs:
tag_name: "@standardnotes/desktop@${{ steps.package-version.outputs.current-version}}"
prerelease: true
draft: true
name: "Desktop ${{ steps.package-version.outputs.current-version}}"
name: "Desktop ${{ inputs.channel == 'beta' && 'Beta' || '' }} ${{ steps.package-version.outputs.current-version}}"
files: packages/desktop/dist/*
- name: Publish Snap
continue-on-error: true