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 name: Desktop Release
on: on:
push: workflow_call:
branches: [ develop, main ] inputs:
paths: channel:
- packages/desktop/** required: true
workflow_dispatch: type: string
jobs: jobs:
Mac: Mac:
@@ -111,7 +111,11 @@ jobs:
packages/desktop/dist/*.yaml packages/desktop/dist/*.yaml
Windows: 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: defaults:
run: run:
working-directory: packages/desktop working-directory: packages/desktop
@@ -163,7 +167,7 @@ jobs:
tag_name: "@standardnotes/desktop@${{ steps.package-version.outputs.current-version}}" tag_name: "@standardnotes/desktop@${{ steps.package-version.outputs.current-version}}"
prerelease: true prerelease: true
draft: 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/* files: packages/desktop/dist/*
- name: Publish Snap - name: Publish Snap
continue-on-error: true continue-on-error: true