-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (53 loc) · 1.86 KB
/
continuous-integration.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Continuous Integration
on:
[push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
- name: Build & Test
run: ./Build/build-and-test.ps1
shell: pwsh
- name: Upload Coverage Badge
if: github.event_name != 'pull_request' && matrix.os == 'windows-latest'
uses: exuanbo/actions-deploy-gist@v1
with:
token: ${{ secrets.CODE_COVERAGE_AUTH_TOKEN }}
gist_id: 527882e89a938dc78f61a08c300edec4
gist_description: "code-coverage-${{ github.ref_name }}"
gist_file_name: fmsync-code-coverage-${{ github.ref_name }}.svg
file_path: tests/TestResults/badge_shieldsio_linecoverage_green.svg
- name: Build Windows Installer
if: matrix.os == 'windows-latest'
run: ./Build/build-windows-installer.ps1
shell: pwsh
- name: Tag With SemVer
id: tag
if: github.ref_name == 'main'
run: ./Build/tag-with-semver.ps1
shell: pwsh
- name: Debug Output
run: |
Write-Output "github.ref_name:${{ github.ref_name }}"
Write-Output "github.event_name:${{ github.event_name }}"
Write-Output "github.ref:${{ github.ref }}"
$tag = git describe --tags --abbrev=0
Write-Output "tag:$tag"
Write-Output "steps.tag.outputs.tag:${{ steps.tag.outputs.tag }}"
Write-Output "$env.GitVersion_SemVer:${{ env.GitVersion_SemVer }}"
shell: pwsh
- name: Release
uses: softprops/action-gh-release@v1
if: github.ref_name == 'main' || (github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
with:
tag_name: ${{ env.GitVersion_SemVer }}