Skip to content

Commit

Permalink
Merge 6e35a15 into e71dc7a
Browse files Browse the repository at this point in the history
  • Loading branch information
danilolutz committed Aug 24, 2022
2 parents e71dc7a + 6e35a15 commit dd3b2f3
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 44 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/dotnet.yml

This file was deleted.

35 changes: 19 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
name: Upload dotnet package
name: Build & Test

on:
release:
types: [created]
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
deploy:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v2
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
source-url: https://nuget.pkg.github.com/CoreZipCode/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- run: dotnet build --configuration Release CoreZipCode.sln
- name: Create the package
run: dotnet pack --configuration Release CoreZipCode.sln --include-symbols -p:PackageVersion=${{github.ref_name}} -v normal
- name: Publish the package to GPR
run: dotnet nuget push CoreZipCode/bin/Release/*.nupkg
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal -p:CollectCoverage=true -p:CoverletOutputFormat=lcov -p:CoverletOutput=./coverage/lcov.info
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./CoreZipCode.Tests/coverage/lcov.info
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Upload dotnet package

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
source-url: https://nuget.pkg.github.com/CoreZipCode/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- run: dotnet build --configuration Release CoreZipCode.sln
- name: Create the package
run: dotnet pack --configuration Release CoreZipCode.sln --include-symbols -p:PackageVersion=${{github.ref_name}} -v normal
- name: Publish the package to GPR
run: dotnet nuget push CoreZipCode/bin/Release/*.nupkg
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ healthchecksdb

.coverageCoreZipCode.deps.json
.coverage
coverage
coverage.json
coverage.cobertura.xml

Expand Down
2 changes: 1 addition & 1 deletion CoreZipCode.Tests/CoreZipCode.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="3.1.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
Expand Down

0 comments on commit dd3b2f3

Please sign in to comment.