Skip to content

Commit fe3e795

Browse files
committed
ci: create release with app package
1 parent ca23b04 commit fe3e795

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.github/workflows/ci.yml

+18-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@ name: CI
33
on:
44
push:
55
branches: [ "main" ]
6+
tags: [ "v*" ]
67
pull_request:
78
branches: [ "main" ]
89

10+
env:
11+
dotnet_version: 6.0.x
12+
build_config: Release
13+
914
jobs:
1015
ci:
1116
runs-on: windows-latest
@@ -14,12 +19,23 @@ jobs:
1419
- name: Setup .NET
1520
uses: actions/setup-dotnet@v3
1621
with:
17-
dotnet-version: 6.0.x
22+
dotnet-version: ${{ env.dotnet_version }}
1823
- name: Restore tools
1924
run: dotnet tool restore
2025
- name: Code format
2126
run: dotnet csharpier --check .
2227
- name: Restore dependencies
2328
run: dotnet restore
2429
- name: Build
25-
run: dotnet build --no-restore -c Debug
30+
run: dotnet build --no-restore -c Release
31+
- name: Publish
32+
if: github.repository == 'protyposis/AudioAlign' && startsWith(github.ref, 'refs/tags/v')
33+
run: |
34+
dotnet publish ./AudioAlign/ -c ${{ env.build_config }} -o dist --no-restore --no-build
35+
7z a AudioAlign-${{ env.build_config }}-${{ github.ref_name }}.zip ./dist/*
36+
- name: GitHub Release
37+
if: github.repository == 'protyposis/AudioAlign' && startsWith(github.ref, 'refs/tags/v')
38+
uses: softprops/action-gh-release@v1
39+
with:
40+
draft: true # create draft release because changelog needs to be added manually (and could be too easily forgotten otherwise)
41+
files: ./AudioAlign*.zip

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ obj/
99
**/packages/*
1010

1111
licenseinfo.txt
12+
/dist

0 commit comments

Comments
 (0)