-
Notifications
You must be signed in to change notification settings - Fork 16
41 lines (38 loc) · 1.23 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: CI
on:
push:
branches: [ "main" ]
tags: [ "v*" ]
pull_request:
branches: [ "main" ]
env:
dotnet_version: 6.0.x
build_config: Release
jobs:
ci:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.dotnet_version }}
- name: Restore tools
run: dotnet tool restore
- name: Code format
run: dotnet csharpier --check .
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release
- name: Publish
if: github.repository == 'protyposis/AudioAlign' && startsWith(github.ref, 'refs/tags/v')
run: |
dotnet publish ./AudioAlign/ -c ${{ env.build_config }} -o dist --no-restore --no-build
7z a AudioAlign-${{ env.build_config }}-${{ github.ref_name }}.zip ./dist/*
- name: GitHub Release
if: github.repository == 'protyposis/AudioAlign' && startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
draft: true # create draft release because changelog needs to be added manually (and could be too easily forgotten otherwise)
files: ./AudioAlign*.zip