-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 1.95 KB
/
CI_CD.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
name: Combined CI / Release
on:
workflow_dispatch:
push:
tags:
- '*'
branches:
- '**'
jobs:
shared_ci_cd:
uses: mu88/github-actions/.github/workflows/ci-cd.yml@main
with:
github-ref-name: ${{ github.ref }}
sonar-key: 'mu88_Project28'
sonar-additional-params: '/d:sonar.cs.opencover.reportsPaths=src/Tests/coverage.opencover.xml /s:$GITHUB_WORKSPACE/SonarQube.Analysis.xml'
docker-publish-mode: regular_and_chiseled_extra
docker-publish-project: 'src/WebApp/WebApp.csproj'
requires-docker-login: true
secrets:
sonar-token: ${{ secrets.SONAR_TOKEN }}
docker-username: ${{ secrets.DOCKERHUB_USERNAME }}
docker-token: ${{ secrets.DOCKERHUB_TOKEN }}
ci_cd:
runs-on: ubuntu-latest
needs: shared_ci_cd
steps:
- uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
- name: Build single-file EXE
run: dotnet publish src/WebApp/WebApp.csproj -r win-x64 -p:PublishSingleFile=true --self-contained true
- name: Create ZIP for release
uses: thedoctor0/zip-release@master
if: ${{ needs.shared_ci_cd.outputs.is-release == 'true' }}
with:
type: 'zip'
filename: ThisIsYourLife.${{ needs.shared_ci_cd.outputs.release-version }}.zip
directory: 'src/WebApp/bin/Release/net9.0/win-x64/publish'
- name: Create CHANGELOG
id: changelog
uses: Requarks/changelog-action@v1
if: ${{ needs.shared_ci_cd.outputs.is-release == 'true' }}
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
excludeTypes: build,docs,other,style,chore(deps)
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
if: ${{ needs.shared_ci_cd.outputs.is-release == 'true' }}
with:
files: src/WebApp/bin/Release/net9.0/win-x64/publish/ThisIsYourLife*.zip
tag_name: ${{ github.ref_name }}
body: ${{ steps.changelog.outputs.changes }}