Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bwachter committed Jul 31, 2024
1 parent c68b063 commit 62256d6
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
26 changes: 25 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ name: Build and publish

on:
push:
tags: ['[0-9]+.[0-9]+.[0-9]+']
branches: [ master ]
workflow_dispatch:

jobs:
login:
build:
name: Build
runs-on: ubuntu-24.04
steps:
Expand All @@ -26,6 +27,11 @@ jobs:
build/*.exe
build/*.dll
build/*.msi
doc:
name: Update documentation
runs-on: ubuntu-24.04
if: github.ref == 'refs/heads/master'
steps:
- name: Commit Doxygen documentation
run: |
( cat doc/Doxyfile ; echo "OUTPUT_DIRECTORY=doc" ) | doxygen -
Expand All @@ -34,3 +40,21 @@ jobs:
git add --all
git commit -m "Update doxygen documentation" -a || true
git push "https://${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
release:
name: Release
needs: [ build ]
runs-on: ubuntu-24.04
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Pull build artifacts
uses: actions/download-artifact@v4
with:
name: artifacts
path: artifacts
- name: Publish Github Release
uses: ncipollo/release-action@00fc2857229c3d51311c8ff6e4954b38203edbd4
with:
artifacts: "artifacts/*.exe,artifacts/*.dll,artifacts/*.msi"
makeLatest: true
allowUpdates: true
generateReleaseNotes: true
11 changes: 9 additions & 2 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ POPT_DLL=build/popt/src/libpopt.dll
INCLUDES=-Ipopt/src/ -Ibuild
OUT=build

$(foreach v, $(.VARIABLES), $(info $(v) = $($(v))))
UUID := $(shell uuidgen)
TAG := $(shell git describe --abbrev=0 --tags --always)
COMMIT_COUNT := $(shell git rev-list $(TAG).. --count)
VERSION := $(TAG).$(COMMIT_COUNT)

# uncomment to debug variables
#$(foreach v, $(.VARIABLES), $(info $(v) = $($(v))))

all: $(OUT)/wsl-templates.h $(OUT)/wsl-service-events.dll $(OUT)/wsl-tool.exe $(OUT)/wsl-service.exe $(OUT)/wsl-service.msi

Expand Down Expand Up @@ -88,4 +94,5 @@ clean:

$(OUT)/wsl-service.msi: $(OUT)/wsl-service.exe $(OUT)/wsl-tool.exe $(OUT)/wsl-service-events.dll wsl-service.wxs copy-mingw-dlls
$(Q)echo "MSI $@"
$(Q)$(WIXL) $(WIXLFLAGS) wsl-service.wxs -o $@
$(Q)sed -e "s/UUID/$(UUID)/" -e "s/VERSION/$(VERSION)/" wsl-service.wxs > $(OUT)/wsl-service.wxs
$(Q)$(WIXL) $(WIXLFLAGS) $(OUT)/wsl-service.wxs -o $@
4 changes: 2 additions & 2 deletions wsl-service.wxs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Name='Service handler for WSL' Manufacturer='Aardsoft Oy'
Id='b9898af3-7659-464d-8838-d46bec5b71b9'
Id='UUID'
UpgradeCode='4d51cb9e-cffa-4005-a67f-5454adb28b08'
Language='1033' Codepage='1252' Version='0.0.1'>
Language='1033' Codepage='1252' Version='VERSION'>
<Package Id='*' Keywords='Installer' Description="Installer for wsl-service"
Comments='Foobar is a registered trademark of Acme Ltd.' Manufacturer='Aardsoft Oy'
InstallerVersion='200' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
Expand Down

0 comments on commit 62256d6

Please sign in to comment.