Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
imp - Updated workflows
Browse files Browse the repository at this point in the history
We've updated the workflows.

---

The workflows now use dotnet instead of the older msbuild and nuget commands. The below changes were made:

  - The NuGet package push is now reduced to only three steps.
  - Used AptiviCEO/docfx-action@master to update docfx
  - No need to specify solution on build-[linux/win]
  - [Experimental] Added build-macos

---

Type: imp
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Aug 20, 2023
1 parent bf54bb4 commit 25b3933
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 41 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ jobs:
with:
dotnet-version: '6.0.x'
- name: Solution Compilation
run: dotnet build --configuration Debug "Uname.NET.sln"
run: dotnet build --configuration Debug
- name: Testing
run: dotnet test --configuration Debug
- uses: actions/upload-artifact@v3
if: success()
if: success() || failure()
with:
name: unamenet-build
path: "Uname.NET/bin/Debug/"
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build Project (macOS)

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:

runs-on: macos-latest

steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Solution Compilation
run: dotnet build --configuration Debug
- name: Testing
run: dotnet test --configuration Debug
- uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: unamenet-build
path: "Uname.NET/bin/Debug/"

notify:

runs-on: ubuntu-latest
needs:
- build
if: ${{ always() }}

steps:
- name: Notify
uses: nobrayner/discord-webhook@v1
with:
github-token: ${{ secrets.G_TOKEN }}
discord-webhook: ${{ secrets.DISCORD_WEBHOOK }}

6 changes: 4 additions & 2 deletions .github/workflows/build-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ jobs:
with:
dotnet-version: '6.0.x'
- name: Solution Compilation
run: dotnet build --configuration Debug "Uname.NET.sln"
run: dotnet build --configuration Debug
- name: Testing
run: dotnet test --configuration Debug
- uses: actions/upload-artifact@v3
if: success()
if: success() || failure()
with:
name: unamenet-build
path: "Uname.NET/bin/Debug/"
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/docgen.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: API Documentation
name: KS API Documentation

on:
push:
Expand All @@ -14,13 +14,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Fetching the source
- uses: "nunit/docfx-action@v1.7.0"
name: Fetching the KS source
- uses: "AptiviCEO/docfx-action@master"
name: Generating documentation
with:
args: DocGen/docfx.json
- name: Saving changes to gh-pages
if: ${{ github.ref == 'refs/heads/main'}}
uses: peaceiris/actions-gh-pages@v3
with:
commit_message: "Updated documentation to reflect latest changes"
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/main.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/pack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: NuGet Gallery Push

on:
release:
types: [published]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Solution Compilation
run: dotnet build --configuration Release
- name: Package Publication
run: dotnet nuget push "Uname.NET/bin/Release/*.symbols.nupkg" --api-key ${{ secrets.NUGET_APIKEY }} --source "nuget.org"

2 changes: 2 additions & 0 deletions Uname.NET/Uname.NET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<PackageTags>uname;kernel;linux;unix;library;information</PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<IncludeSymbols>True</IncludeSymbols>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<RootNamespace>UnameNET</RootNamespace>
<LangVersion>10.0</LangVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down

0 comments on commit 25b3933

Please sign in to comment.