Skip to content

Commit

Permalink
propagate version into manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsgrill committed Aug 31, 2024
1 parent e8380a1 commit 1e90537
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
name: Set version
with:
variables: |
VERSION: '${{ github.ref_type }}' == 'tag' ? "${{ steps.release_info.outputs.version }}" : "0.0.0-dev"
VERSION: '${{ github.ref_type }}' == 'tag' ? "${{ steps.release_info.outputs.version }}" : "0.0.0.0"
- name: enable Projection FS
run: Enable-WindowsOptionalFeature -Online -FeatureName Client-ProjFS -NoRestart
Expand All @@ -59,8 +59,15 @@ jobs:
- name: Generate
run: go generate ./...

- name: Set logback env values
uses: rvolo/[email protected]
with:
filepath: "cmd/main/main.exe.manifest"
xpath: "//assembly/assemblyIdentity/@version"
replace: "${{ env.VERSION }}"

- name: Build
run: go build -o potatodrive.exe -ldflags="-H windowsgui -X 'main.Version=${{ env.VERSION}}'" ./cmd/main
run: go build -o potatodrive.exe -ldflags="-H windowsgui -X 'main.Version=${{ env.VERSION }}'" ./cmd/main
- name: Compress
uses: crazy-max/ghaction-upx@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion cmd/main/main.exe.manifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="PotatoDrive" type="win32"/>
<assemblyIdentity version="0.0.0.0" processorArchitecture="ia64" name="PotatoDrive" type="win32"/>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
Expand Down

0 comments on commit 1e90537

Please sign in to comment.