-
-
Notifications
You must be signed in to change notification settings - Fork 11
78 lines (63 loc) · 1.89 KB
/
Copy pathbuild.yml
File metadata and controls
78 lines (63 loc) · 1.89 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Build Package
on:
push:
pull_request:
defaults:
run:
working-directory: src
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
test-framework-command: --framework net10.0
steps:
- uses: actions/checkout@v7
- name: Install DotNet
uses: actions/setup-dotnet@v5
with:
dotnet-version: "10.0.x"
- name: Restore Dependencies
run: dotnet restore
- name: Build Package
run: dotnet build --no-restore -c Release
- name: Perform Unit Testing
run: dotnet test --no-build -c Release ${{ matrix.test-framework-command }} --verbosity normal --filter "TestCategory!=Benchmark"
- name: Create Package
run: dotnet pack Simplify.Web/Simplify.Web.csproj --no-build -c Release -o ./publish
- name: Upload packages
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v7
with:
name: Packages
path: ./src/publish/
release:
if: startsWith(github.ref, 'refs/tags/')
needs: build
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Download packages
uses: actions/download-artifact@v7
with:
name: Packages
path: packages
- name: Extract changelog entry
run: |
awk '/^## \[/{if(f) exit; f=1; next} f' \
src/Simplify.Web/CHANGELOG.md \
> /tmp/release_notes.md
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "${{ github.ref_name }}" \
--title "${{ github.ref_name }}" \
--notes-file /tmp/release_notes.md \
packages/*.nupkg