Skip to content

Build and Release

Build and Release #4

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*'
# Allow manual triggering from the Actions tab
workflow_dispatch:
# Set permissions for the GITHUB_TOKEN
permissions:
contents: write # This is required for creating releases
jobs:
build-test-release:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup MinGW
uses: egor-tensin/setup-mingw@v2
with:
platform: x64
version: 12.2.0
- name: Build application
shell: cmd
run: |
build.bat
- name: Verify build output
run: dir build
- name: Set up CMake
uses: lukka/get-cmake@latest
- name: Build and Run Tests
run: |
cd tests
mkdir -p build
cd build
cmake ..
cmake --build . --config Debug
./Debug/time_conversion_tests.exe
./Debug/time_zone_conversion_tests.exe
shell: bash
- name: Get Version from Tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
shell: bash
if: startsWith(github.ref, 'refs/tags/')
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
build/windows-est-clock-portable.exe
draft: false
prerelease: false
generate_release_notes: true
name: EST Clock v${{ steps.get_version.outputs.VERSION }}
body: |
## EST Clock v${{ steps.get_version.outputs.VERSION }}
### Installation
1. Download the `windows-est-clock-portable.exe` file
2. Double-click to run (no installation required)
### Changes in this version
See release notes above for details.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}