Skip to content

coding-time-tracker-1.0.0 #13

coding-time-tracker-1.0.0

coding-time-tracker-1.0.0 #13

Workflow file for this run

name: Release
run-name: coding-time-tracker-${{ github.ref_name }}
on:
push:
tags:
- "*.*.*"
permissions:
contents: write
jobs:
release:
runs-on: windows-2022
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: "6.10.3"
arch: "win64_msvc2022_64"
cache: true
- name: Configure release build
shell: pwsh
run: |
cmake -S . -B build `
-G "Visual Studio 17 2022" `
-A x64
- name: Build
shell: pwsh
run: |
cmake --build build `
--config Release `
--parallel
- name: Test
shell: pwsh
run: |
ctest `
--test-dir build `
-C Release `
--output-on-failure
- name: Prepare release archive
shell: pwsh
run: |
$packageName = "coding-time-tracker-${{ github.ref_name }}-windows-x64"
$packagePath = "dist\$packageName"
$archivePath = "dist\$packageName.zip"
$executablePath = "$packagePath\coding-time-tracker.exe"
New-Item `
-ItemType Directory `
-Path $packagePath `
-Force |
Out-Null
Copy-Item `
"build\Release\coding-time-tracker.exe" `
$executablePath
windeployqt.exe `
--release `
--no-translations `
--no-system-d3d-compiler `
--no-opengl-sw `
--skip-plugin-types "generic,iconengines,imageformats,networkinformation,tls" `
--dir $packagePath `
$executablePath
Compress-Archive `
-LiteralPath $packagePath `
-DestinationPath $archivePath `
-Force
- name: Publish GitHub release
shell: pwsh
env:
GH_TOKEN: ${{ github.token }}
run: |
$archiveName = "coding-time-tracker-${{ github.ref_name }}-windows-x64.zip"
$archivePath = "dist\$archiveName"
gh release create "${{ github.ref_name }}" `
$archivePath `
--repo "${{ github.repository }}" `
--verify-tag `
--generate-notes `
--title "${{ github.ref_name }}" `
--latest