Skip to content

Commit 7e6fd9f

Browse files
committed
Add Release Code
1 parent 9f39bf2 commit 7e6fd9f

File tree

2 files changed

+51
-27
lines changed

2 files changed

+51
-27
lines changed

.github/workflows/build.yml

Lines changed: 49 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,52 @@ on:
55
branches: [ main ]
66

77
jobs:
8-
build:
9-
runs-on: ubuntu-latest
10-
strategy:
11-
matrix:
12-
runtime: [win-x64, osx-x64, osx-arm64, linux-x64]
13-
14-
steps:
15-
- name: Checkout repository
16-
uses: actions/checkout@v3
17-
18-
- name: Setup .NET 9 SDK
19-
uses: actions/setup-dotnet@v3
20-
with:
21-
dotnet-version: '9.0.x'
22-
23-
- name: Restore dependencies
24-
run: dotnet restore
25-
26-
- name: Publish single-file executable for ${{ matrix.runtime }}
27-
run: |
28-
dotnet publish src/CLI -c Release -r ${{ matrix.runtime }} --self-contained true /p:PublishSingleFile=true /p:IncludeAllContentForSelfExtract=true -o ./publish/${{ matrix.runtime }}
29-
30-
- name: Upload artifact for ${{ matrix.runtime }}
31-
uses: actions/upload-artifact@v4
32-
with:
33-
name: DrumMidiRemapper-${{ matrix.runtime }}
34-
path: ./publish/${{ matrix.runtime }}
8+
build:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
runtime: [win-x64, osx-x64, osx-arm64, linux-x64]
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
18+
- name: Setup .NET 9 SDK
19+
uses: actions/setup-dotnet@v3
20+
with:
21+
dotnet-version: '9.0.x'
22+
23+
- name: Restore dependencies
24+
run: dotnet restore
25+
26+
- name: Publish single-file executable for ${{ matrix.runtime }}
27+
run: |
28+
dotnet publish src/CLI -c Release -r ${{ matrix.runtime }} --self-contained true /p:PublishSingleFile=true /p:IncludeAllContentForSelfExtract=true -o ./publish/${{ matrix.runtime }}
29+
30+
- name: Upload artifact for ${{ matrix.runtime }}
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: DrumMidiRemapper-${{ matrix.runtime }}
34+
path: ./publish/${{ matrix.runtime }}
35+
36+
release:
37+
needs: build
38+
runs-on: ubuntu-latest
39+
if: github.ref == 'refs/heads/main'
40+
steps:
41+
- name: Download all artifacts
42+
uses: actions/download-artifact@v4
43+
with:
44+
path: ./artifacts
45+
46+
- name: Create GitHub Release
47+
id: create_release
48+
uses: softprops/action-gh-release@v2
49+
with:
50+
tag_name: ${{ github.sha }}
51+
name: Release ${{ github.sha }}
52+
draft: false
53+
prerelease: false
54+
files: ./artifacts/**/*
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,3 +482,5 @@ $RECYCLE.BIN/
482482

483483
# Vim temporary swap files
484484
*.swp
485+
486+
midis/**

0 commit comments

Comments
 (0)