Skip to content

Commit 18342e6

Browse files
alex-daviesAlex Davies
andauthored
Add github workfows (#24)
* Add yaml for release builds * Add yaml for test builds Co-authored-by: Alex Davies <alex@codecutout.com>
1 parent def410d commit 18342e6

File tree

4 files changed

+76
-50
lines changed

4 files changed

+76
-50
lines changed

.github/workflows/release.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: release
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
jobs:
7+
release:
8+
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Set RELEASE_VERSION
13+
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV #GITHUB_REF:11 skips first 11 characters of GITHUB_REF (GITHUB_REF will look like 'refs/tags/v*.*.*')
14+
- uses: actions/checkout@v4
15+
- name: Setup .NET
16+
uses: actions/setup-dotnet@v4
17+
with:
18+
dotnet-version: 8.0.*
19+
- name: Pack
20+
run: dotnet pack --output ./artifacts --configuration Release -p:GeneratePackageOnBuild=false -p:ContinuousIntegrationBuild=true -p:Version=$RELEASE_VERSION
21+
- name: Publish packages
22+
run: dotnet nuget push ./artifacts/**.nupkg --source nuget.org --api-key ${{secrets.NUGET_TOKEN}}

.github/workflows/test.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: test
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
types: [synchronize, opened, reopened, ready_for_review, unlabeled]
7+
paths-ignore:
8+
- 'README.md'
9+
push:
10+
branches: [master]
11+
paths-ignore:
12+
- 'README.md'
13+
14+
jobs:
15+
build:
16+
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Setup .NET
22+
uses: actions/setup-dotnet@v4
23+
with:
24+
dotnet-version: 8.0.*
25+
- name: Install dotnet-validate
26+
run: dotnet tool install --global dotnet-validate --version 0.0.1-preview.304
27+
- name: Restore dependencies
28+
run: dotnet restore
29+
- name: Build
30+
run: dotnet build -p:ContinuousIntegrationBuild=true --configuration Release --no-restore
31+
- name: Test
32+
run: dotnet test --configuration Release --no-build --verbosity normal
33+
- name: Pack
34+
run: dotnet pack --output ./artifacts --no-build
35+
- name: Validate NuGet package
36+
run: dotnet-validate package local artifacts/*.nupkg

appveyor.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
4+
<LangVersion>7.3</LangVersion>
5+
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
6+
<Company>Codecutout</Company>
7+
<Authors>Alex Davies</Authors>
8+
<Description>StringToExpression supports the compiling a domain specific string into a .NET expression.
29

3-
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0</TargetFrameworks>
5-
<Company>Codecutout</Company>
6-
<Authors>Alex Davies</Authors>
7-
<Description>StringToExpression supports the compiling a domain specific string into a .NET expression.
8-
9-
Out of the box configuration is provided for parsing arithmetic expressions and for parsing OData filter strings. Although can be configured to parse string of any format</Description>
10-
<Copyright>Copyright © 2017</Copyright>
11-
<PackageLicenseUrl>https://github.com/codecutout/StringToExpression/blob/master/LICENSE</PackageLicenseUrl>
12-
<PackageProjectUrl>https://github.com/codecutout/StringToExpression</PackageProjectUrl>
13-
<PackageTags>Expression Filter OData Arithmetic DSL</PackageTags>
14-
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
15-
<Version>2.1.1</Version>
16-
<PackageReleaseNotes>Add checks to prevent keywords from being identified within property names.</PackageReleaseNotes>
17-
</PropertyGroup>
18-
10+
Out of the box configuration is provided for parsing arithmetic expressions and for parsing OData filter strings. Although can be configured to parse string of any format</Description>
11+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
12+
<PackageProjectUrl>https://github.com/codecutout/StringToExpression</PackageProjectUrl>
13+
<PackageTags>Expression Filter OData Arithmetic DSL</PackageTags>
14+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
15+
<IncludeSymbols>true</IncludeSymbols>
16+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
17+
</PropertyGroup>
18+
<ItemGroup>
19+
<None Include="..\..\README.md" Pack="true" PackagePath="\"/>
20+
</ItemGroup>
1921
</Project>

0 commit comments

Comments
 (0)