Skip to content

Commit 7d2c243

Browse files
committed
Update Build and Release
1 parent 3a05f62 commit 7d2c243

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

.github/workflows/build-and-release.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@ on:
77
pull_request:
88
branches: [ main ]
99

10-
env:
11-
VERSION: ${{ github.ref_name }}
12-
1310
jobs:
1411
build-windows:
15-
name: Build Windows Desktop + CLI (${{ env.VERSION }})
12+
name: Build Windows Desktop + CLI (${{ github.ref_name }})
1613
runs-on: windows-latest
1714
steps:
1815
- uses: actions/checkout@v4
@@ -33,28 +30,28 @@ jobs:
3330
- name: Build Windows MSIX
3431
run: |
3532
dotnet publish ./src/GUI/GUI.csproj -f net9.0-windows10.0.19041.0 -c Release `
36-
-p:Version=${{ env.VERSION }} `
33+
-p:Version=${{ github.ref_name }} `
3734
-p:WindowsPackageType=MSIX `
3835
-p:GenerateAppxPackageOnBuild=true
3936
4037
- name: Build CLI
41-
run: dotnet publish ./src/CLI/CLI.csproj -c Release -r win-x64 --self-contained true -p:Version=${{ env.VERSION }} -o ./cli-publish
38+
run: dotnet publish ./src/CLI/CLI.csproj -c Release -r win-x64 --self-contained true -p:Version=${{ github.ref_name }} -o ./cli-publish
4239

4340
- name: Package Windows MSIX
4441
shell: pwsh
4542
run: |
4643
$msix = Get-ChildItem -Path ./src/GUI/bin/Release/** -Recurse -Include "*.msix" | Select-Object -First 1
47-
Compress-Archive -Path $msix.FullName -DestinationPath DrumMidiRemapper-Windows-${{ env.VERSION }}.zip
44+
Compress-Archive -Path $msix.FullName -DestinationPath DrumMidiRemapper-Windows-${{ github.ref_name }}.zip
4845
4946
- uses: actions/upload-artifact@v4
5047
with:
51-
name: DrumMidiRemapper-Windows-${{ env.VERSION }}
48+
name: DrumMidiRemapper-Windows-${{ github.ref_name }}
5249
path: |
53-
DrumMidiRemapper-Windows-${{ env.VERSION }}.zip
50+
DrumMidiRemapper-Windows-${{ github.ref_name }}.zip
5451
./cli-publish/**
5552
5653
build-macos:
57-
name: Build macOS Desktop + CLI (${{ env.VERSION }})
54+
name: Build macOS Desktop + CLI (${{ github.ref_name }})
5855
runs-on: macos-latest
5956
steps:
6057
- uses: actions/checkout@v4
@@ -73,7 +70,7 @@ jobs:
7370
run: dotnet restore
7471

7572
- name: Build MacCatalyst App
76-
run: dotnet publish ./src/GUI/GUI.csproj -f net9.0-maccatalyst -c Release -p:Version=${{ env.VERSION }}
73+
run: dotnet publish ./src/GUI/GUI.csproj -f net9.0-maccatalyst -c Release -p:Version=${{ github.ref_name }}
7774

7875
- name: Create DMG Installer
7976
run: |
@@ -86,20 +83,20 @@ jobs:
8683
--icon-size 100 \
8784
--icon "$APP_PATH" 175 190 \
8885
--app-drop-link 425 190 \
89-
"DrumMidiRemapper-${{ env.VERSION }}.dmg" "$APP_PATH"
86+
"DrumMidiRemapper-${{ github.ref_name }}.dmg" "$APP_PATH"
9087
9188
- name: Build CLI
92-
run: dotnet publish ./src/CLI/CLI.csproj -c Release -r osx-x64 --self-contained true -p:Version=${{ env.VERSION }} -o ./cli-publish
89+
run: dotnet publish ./src/CLI/CLI.csproj -c Release -r osx-x64 --self-contained true -p:Version=${{ github.ref_name }} -o ./cli-publish
9390

9491
- uses: actions/upload-artifact@v4
9592
with:
96-
name: DrumMidiRemapper-macOS-${{ env.VERSION }}
93+
name: DrumMidiRemapper-macOS-${{ github.ref_name }}
9794
path: |
98-
DrumMidiRemapper-${{ env.VERSION }}.dmg
95+
DrumMidiRemapper-${{ github.ref_name }}.dmg
9996
./cli-publish/**
10097
10198
build-linux:
102-
name: Build Linux CLI only (${{ env.VERSION }})
99+
name: Build Linux CLI only (${{ github.ref_name }})
103100
runs-on: ubuntu-latest
104101
steps:
105102
- uses: actions/checkout@v4
@@ -112,9 +109,9 @@ jobs:
112109
run: dotnet restore
113110

114111
- name: Build CLI Linux
115-
run: dotnet publish ./src/CLI/CLI.csproj -c Release -r linux-x64 --self-contained true -p:Version=${{ env.VERSION }} -o ./cli-publish
112+
run: dotnet publish ./src/CLI/CLI.csproj -c Release -r linux-x64 --self-contained true -p:Version=${{ github.ref_name }} -o ./cli-publish
116113

117114
- uses: actions/upload-artifact@v4
118115
with:
119-
name: DrumMidiRemapper-LinuxCLI-${{ env.VERSION }}
116+
name: DrumMidiRemapper-LinuxCLI-${{ github.ref_name }}
120117
path: ./cli-publish/**

0 commit comments

Comments
 (0)