Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/dotnet/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/setup-dotnet@v1
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
working-directory: src
shell: bash
Expand Down
36 changes: 24 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,50 @@ name: Release
on:
workflow_dispatch:
inputs:
version:
description: Version to release, e.g. 1.0.0
type: string
required: false
pre-release:
description: Genereates a Pre-Release when checked
type: boolean
required: false
default: "false"
default: false
push:
branches:
- release/**
- release

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
contents: "write"
packages: "write"
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get version for next release
if: ${{ github.event.inputs.version == '' }}
uses: wemogy/next-version-action@2.0.3
uses: wemogy/get-release-version-action@v4.3.2
id: release-version
if: ${{ github.event.inputs.version == '' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v2
prefix: v
create-tag: 'true'
git-username: wemogy IT
git-email: it@wemogy.com
mode: semantic

# Nuget
- name: Build .NET
uses: ./.github/actions/dotnet
with:
version: ${{ steps.release-version.outputs.next-version }}${{ github.event.inputs.version && 'pre' || '' }}
version: ${{ github.event.inputs.version || steps.release-version.outputs.version }}
- name: Create Nuget package(s)
run: dotnet pack --no-build --configuration Release /p:VersionPrefix=${{ steps.release-version.outputs.next-version }}${{ github.event.inputs.version && 'pre' || '' }}
run: dotnet pack --configuration Release /p:VersionPrefix=${{ github.event.inputs.version || steps.release-version.outputs.version }}
working-directory: src
- name: Publish Nuget package(s)
run: dotnet nuget push **/**/*.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.PUBLIC_NUGET_TOKEN }}
Expand All @@ -44,8 +56,8 @@ jobs:
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
name: Version ${{ steps.release-version.outputs.next-version }}${{ github.event.inputs.version && 'pre' || '' }}
tag_name: ${{ steps.release-version.outputs.next-version-name }}${{ github.event.inputs.version && 'pre' || '' }}
name: Version ${{ github.event.inputs.version || steps.release-version.outputs.version }}
tag_name: ${{ github.event.inputs.version && format('v{0}', github.event.inputs.version) || steps.release-version.outputs.version-name }}
prerelease: ${{ github.event.inputs.pre-release || false }}
generate_release_notes: true
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
name: Tests
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# .NET Tests
- name: Build .NET
Expand All @@ -36,7 +36,7 @@ jobs:
output: 'both'

- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2.5.0
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
Expand Down
2 changes: 1 addition & 1 deletion src/Wemogy.AspNet.Tests/Wemogy.AspNet.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Wemogy.AspNet/Wemogy.AspNet.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>true</IsPackable>
</PropertyGroup>

Expand Down