Skip to content
This repository has been archived by the owner on Nov 17, 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 a816202 commit 92f5131
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 43 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ jobs:
with:
dotnet-version: '6.0.x'
- name: Solution Compilation
run: dotnet build --configuration Debug "SharpLyrics.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: tr-build
name: sl-build
path: "SharpLyrics/bin/Debug/"

notify:
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: sl-build
path: "SharpLyrics/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 }}

8 changes: 5 additions & 3 deletions .github/workflows/build-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ jobs:
with:
dotnet-version: '6.0.x'
- name: Solution Compilation
run: dotnet build --configuration Debug "SharpLyrics.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: tr-build
name: sl-build
path: "SharpLyrics/bin/Debug/"

notify:
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 "SharpLyrics/bin/Release/*.symbols.nupkg" --api-key ${{ secrets.NUGET_APIKEY }} --source "nuget.org"

1 change: 1 addition & 0 deletions SharpLyrics/SharpLyrics.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<IncludeSymbols>True</IncludeSymbols>
<PackageIcon>OfficialAppIcon-SharpLyrics-512.png</PackageIcon>
<AssemblyVersion>1.0.0.1</AssemblyVersion>
<PackageVersion>1.0.0.1</PackageVersion>
Expand Down

0 comments on commit 92f5131

Please sign in to comment.