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
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release

on:
workflow_dispatch:
# Allows manual triggering of the workflow
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal --framework net6.0

- name: Get version from project
id: get_version
run: |
VERSION=$(dotnet run --project Frends.Web -- --version 2>/dev/null || echo "1.0.0")
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Pack NuGet package
run: dotnet pack Frends.Web/Frends.Web.csproj --configuration Release --no-build --output ./artifacts

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.get_version.outputs.version }}
name: Release v${{ steps.get_version.outputs.version }}
files: ./artifacts/*.nupkg
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on:
workflow_dispatch:
# Allows manual triggering of the workflow
push:
branches-ignore:
- master
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore

- name: Test
run: dotnet test --no-build --verbosity normal --framework net6.0
5 changes: 3 additions & 2 deletions Frends.Web/Frends.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<TargetFrameworks>netstandard2.0;net471</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Company>HiQ Finland</Company>
<Authors>HiQ Finland</Authors>
<Description>FRENDS Web tasks</Description>
<Authors>Frends</Authors>
<Description>Frends Web tasks (legacy)</Description>
<Version>1.2.60</Version>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net471'">
<Reference Include="System.Net.Http" />
Expand Down