Skip to content

Commit 78d8547

Browse files
authored
Merge pull request #446 from sebastienros/master
Add build workflow
2 parents d4c3466 + 5015036 commit 78d8547

File tree

3 files changed

+95
-0
lines changed

3 files changed

+95
-0
lines changed

.github/workflows/build.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths-ignore:
7+
- 'readme.md'
8+
9+
pull_request:
10+
branches: [ master ]
11+
paths-ignore:
12+
- 'readme.md'
13+
14+
jobs:
15+
build:
16+
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
matrix:
20+
os: [ubuntu-latest, windows-latest]
21+
22+
env:
23+
DOTNET_NOLOGO: true
24+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
25+
DOTNET_CLI_TELEMETRY_OPTOUT: true
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-dotnet@v4
30+
with:
31+
global-json-file: global.json
32+
33+
- name: Build
34+
run: dotnet build -c:Release
35+
36+
- name: Tests - Latest TFM
37+
run: dotnet run --no-build -c:Release -f:net9.0 --project test/FastExpressionCompiler.TestsRunner/FastExpressionCompiler.TestsRunner.csproj
38+
39+
- if: matrix.os == 'windows-latest'
40+
name: Tests - net472
41+
run: dotnet run --no-build -c:Release --project test/FastExpressionCompiler.TestsRunner.Net472

.github/workflows/publish.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
env:
13+
DOTNET_NOLOGO: true
14+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
15+
DOTNET_CLI_TELEMETRY_OPTOUT: true
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-dotnet@v4
20+
with:
21+
global-json-file: global.json
22+
23+
- name: Build
24+
run: dotnet build --configuration Release
25+
26+
- name: Make Internal
27+
shell: pwsh
28+
run: ./BuildScripts/MakeInternal.ps1
29+
30+
- name: Pack with dotnet
31+
run: |
32+
arrTag=(${GITHUB_REF//\// })
33+
VERSION="${arrTag[2]}"
34+
VERSION="${VERSION//v}"
35+
echo "$VERSION"
36+
37+
dotnet pack --no-build --output artifacts -p:Version=$VERSION -p:ContinuousIntegrationBuild=True ./nuspecs/FastExpressionCompiler.src.nuspec
38+
dotnet pack --no-build --output artifacts -p:Version=$VERSION -p:ContinuousIntegrationBuild=True ./nuspecs/FastExpressionCompiler.LightExpression.src.nuspec
39+
dotnet pack --no-build --output artifacts -p:Version=$VERSION -p:ContinuousIntegrationBuild=True ./nuspecs/FastExpressionCompiler.Internal.src.nuspec
40+
dotnet pack --no-build --output artifacts -p:Version=$VERSION -p:ContinuousIntegrationBuild=True ./nuspecs/FastExpressionCompiler.LightExpression.Internal.src.nuspec
41+
42+
- uses: actions/upload-artifact@v4
43+
with:
44+
name: Packages
45+
path: ./artifacts
46+
47+
# - name: Push with dotnet
48+
# run: dotnet nuget push artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

global.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"sdk": {
3+
"version": "9.0.100",
4+
"rollForward": "latestMajor"
5+
}
6+
}

0 commit comments

Comments
 (0)