Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
name: ci

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-test:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Release check
run: .\scripts\release-check.ps1
name: ci
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-test:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Release check
run: .\scripts\release-check.ps1
182 changes: 91 additions & 91 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,91 @@
name: release

on:
workflow_dispatch:
inputs:
runtime:
description: Windows runtime identifier
required: true
default: win-x64
release_tag:
description: Existing tag to publish as a GitHub Release
required: false
default: ''
push:
tags:
- 'v*'

permissions:
contents: write

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false

jobs:
publish:
runs-on: windows-latest
env:
RUNTIME: ${{ inputs.runtime || 'win-x64' }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Install Inno Setup
run: winget install --id JRSoftware.InnoSetup -e -s winget --accept-source-agreements --accept-package-agreements

- name: Release check
run: .\scripts\release-check.ps1 -Runtime $env:RUNTIME -BuildInstaller -DownloadFFmpeg

- name: Package release assets
shell: pwsh
run: |
Compress-Archive -Path publish/cli/* -DestinationPath FluxForm.CLI-${{ env.RUNTIME }}.zip -Force
Compress-Archive -Path publish/wpf/* -DestinationPath FluxForm.WPF-${{ env.RUNTIME }}.zip -Force

- name: Upload CLI artifact
uses: actions/upload-artifact@v4
with:
name: FluxForm.CLI-${{ env.RUNTIME }}
path: publish/cli
if-no-files-found: error

- name: Upload WPF artifact
uses: actions/upload-artifact@v4
with:
name: FluxForm.WPF-${{ env.RUNTIME }}
path: publish/wpf
if-no-files-found: error

- name: Upload installer artifact
uses: actions/upload-artifact@v4
with:
name: FluxFormSetup-0.1.1
path: publish/installer/FluxFormSetup-0.1.1.exe
if-no-files-found: error

- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/') || inputs.release_tag != ''
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ inputs.release_tag || github.ref_name }}
shell: pwsh
run: |
$releaseNotesPath = ".github/release-notes/$env:RELEASE_TAG.md"
if (-not (Test-Path -LiteralPath $releaseNotesPath)) {
throw "Release notes file is required: $releaseNotesPath"
}

gh release create $env:RELEASE_TAG `
FluxForm.CLI-${{ env.RUNTIME }}.zip `
FluxForm.WPF-${{ env.RUNTIME }}.zip `
publish/installer/FluxFormSetup-0.1.1.exe `
--title $env:RELEASE_TAG `
--verify-tag `
--notes-file $releaseNotesPath
name: release
on:
workflow_dispatch:
inputs:
runtime:
description: Windows runtime identifier
required: true
default: win-x64
release_tag:
description: Existing tag to publish as a GitHub Release
required: false
default: ''
push:
tags:
- 'v*'
permissions:
contents: write
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
publish:
runs-on: windows-latest
env:
RUNTIME: ${{ inputs.runtime || 'win-x64' }}
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Install Inno Setup
run: winget install --id JRSoftware.InnoSetup -e -s winget --accept-source-agreements --accept-package-agreements
- name: Release check
run: .\scripts\release-check.ps1 -Runtime $env:RUNTIME -BuildInstaller -DownloadFFmpeg
- name: Package release assets
shell: pwsh
run: |
Compress-Archive -Path publish/cli/* -DestinationPath FluxForm.CLI-${{ env.RUNTIME }}.zip -Force
Compress-Archive -Path publish/wpf/* -DestinationPath FluxForm.WPF-${{ env.RUNTIME }}.zip -Force
- name: Upload CLI artifact
uses: actions/upload-artifact@v4
with:
name: FluxForm.CLI-${{ env.RUNTIME }}
path: publish/cli
if-no-files-found: error
- name: Upload WPF artifact
uses: actions/upload-artifact@v4
with:
name: FluxForm.WPF-${{ env.RUNTIME }}
path: publish/wpf
if-no-files-found: error
- name: Upload installer artifact
uses: actions/upload-artifact@v4
with:
name: FluxFormSetup-0.1.1
path: publish/installer/FluxFormSetup-0.1.1.exe
if-no-files-found: error
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/') || inputs.release_tag != ''
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ inputs.release_tag || github.ref_name }}
shell: pwsh
run: |
$releaseNotesPath = ".github/release-notes/$env:RELEASE_TAG.md"
if (-not (Test-Path -LiteralPath $releaseNotesPath)) {
throw "Release notes file is required: $releaseNotesPath"
}
gh release create $env:RELEASE_TAG `
FluxForm.CLI-${{ env.RUNTIME }}.zip `
FluxForm.WPF-${{ env.RUNTIME }}.zip `
publish/installer/FluxFormSetup-0.1.1.exe `
--title $env:RELEASE_TAG `
--verify-tag `
--notes-file $releaseNotesPath
Loading