-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (46 loc) · 1.59 KB
/
ci.yml
File metadata and controls
57 lines (46 loc) · 1.59 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
name: CI
on:
push:
branches-ignore:
- master
pull_request:
branches:
- '**'
jobs:
build-test-pack:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3.0.0
with:
versionSpec: '6.0.0'
- name: Determine Version
id: gitversion
shell: bash
run: |
VERSION=$(dotnet gitversion /output json /showvariable SemVer)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Restore dependencies
run: dotnet restore --artifacts-path=/tmp/artifacts/blazor-hashrouting
- name: Build
run: dotnet build --configuration Release --no-restore --artifacts-path=/tmp/artifacts/blazor-hashrouting
- name: Run tests
run: dotnet test --configuration Release --no-build --artifacts-path=/tmp/artifacts/blazor-hashrouting
- name: Pack
run: dotnet pack src/Blazor.HashRouting/Blazor.HashRouting.csproj --configuration Release --no-build --artifacts-path=/tmp/artifacts/blazor-hashrouting
- name: Upload package artifacts
uses: actions/upload-artifact@v4
with:
name: blazor-hashrouting-${{ env.VERSION }}
path: /tmp/artifacts/blazor-hashrouting/package/release/*