Skip to content

Commit

Permalink
Update workflow dotnet version 8 (#101)
Browse files Browse the repository at this point in the history
* Update action versions

* Narrow down permissions

* update dotnet version

---------

Co-authored-by: Erik van Brakel <[email protected]>
  • Loading branch information
ahongbynder and Erik van Brakel authored Sep 23, 2024
1 parent 786c8dc commit 08998cc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
name: Publish

on:
release:
types: [ published ]

permissions:
contents: read
pull-requests: write

jobs:
build-tests:
name: Tests
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: '5.0.x'
dotnet-version: '8.0.x'
- name: Build
run: dotnet build --configuration Release

Expand All @@ -29,15 +34,15 @@ jobs:

publish-nuget:
name: Release
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: build-tests

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: '5.0.x'
dotnet-version: '8.0.x'

- name: Install dependencies
run: dotnet restore
Expand All @@ -46,7 +51,7 @@ jobs:
run: dotnet build --configuration Release --no-restore

- name: Publish to NuGet
uses: brandedoutcast/publish-nuget@v2
uses: brandedoutcast/publish-nuget@v2.5.5
with:
PROJECT_FILE_PATH: Bynder/Sdk/Bynder.Sdk.csproj
VERSION_REGEX: '^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$'
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,29 @@ name: Tests

on: [ push, pull_request ]

permissions:
contents: read
pull-requests: write

jobs:
build:
name: Tests
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: '5.0.x'
dotnet-version: '8.0.x'
- name: Build
run: dotnet build --configuration Release

- name: Run unit tests
run: dotnet test --no-build --configuration Release /p:CollectCoverage=true /p:CoverletOutputFormat=lcov

- name: Publish coverage report to Coveralls
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2.2.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./Bynder/Test/coverage.info
Expand Down

1 comment on commit 08998cc

@quirijnslings
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't forget to update the dependencies in the nuspec as well (if that isn't done automatically)

Please sign in to comment.