-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from ewilliams0305/47-multi-target
47 multi target
- Loading branch information
Showing
25 changed files
with
347 additions
and
555 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: PUBLISH BETA | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- 'development' | ||
- 'dev/**' | ||
- 'fix/**' | ||
- 'bug/**' | ||
- 'hotfix/**' | ||
- 'feat/**' | ||
- 'feature/**' | ||
|
||
jobs: | ||
build: | ||
if: github.event.pull_request.merged == true | ||
|
||
runs-on: ubuntu-latest | ||
outputs: | ||
Version: ${{ steps.gitversion.outputs.SemVer }} | ||
CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 #fetch-depth is needed for GitVersion | ||
|
||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: 5.x | ||
|
||
- name: Determine Version | ||
uses: gittools/actions/gitversion/[email protected] | ||
id: gitversion | ||
|
||
- name: Display GitVersion outputs | ||
run: | | ||
echo "Version: ${{ steps.gitversion.outputs.SemVer }}" | ||
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}" | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.x | ||
|
||
- name: Dotnet Restore | ||
run: dotnet restore ./**.sln | ||
|
||
- name: Build Source Projects | ||
run: dotnet build ./**.sln -p:Version='${{ steps.gitversion.outputs.SemVer }}' -c Release | ||
|
||
- name: Pack NuGet Packages | ||
run: dotnet pack ./**.sln -p:Version='${{ steps.gitversion.outputs.SemVer }}' -c Release -o bin/nugetPackages | ||
|
||
- name: Upload NuGet package to GitHub | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nugetPackage | ||
path: bin/nugetPackages | ||
|
||
release: | ||
if: needs.build.outputs.CommitsSinceVersionSource > 0 | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
steps: | ||
- name: Download nuget package artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: nugetPackage | ||
path: bin/nugetPackages | ||
|
||
- name: Create Release | ||
uses: ncipollo/[email protected] | ||
with: | ||
tag: ${{ needs.build.outputs.Version }} | ||
name: Release ${{ needs.build.outputs.Version }} | ||
body: Released via github actions workflow, see repository README.md | ||
generateReleaseNotes: true | ||
artifacts: "bin/nugetPackages/*.nupkg" | ||
prerelease: true | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push packages to Nuget | ||
run: | | ||
for file in $(find bin/nugetPackages -type f -name "*.nupkg"); do | ||
echo $file | ||
dotnet nuget push $file --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate | ||
done | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: PUBLISH RELEASE | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
pull_request: | ||
types: [closed] | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
if: github.event.pull_request.merged == true | ||
|
||
runs-on: ubuntu-latest | ||
outputs: | ||
Version: ${{ steps.gitversion.outputs.SemVer }} | ||
CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 #fetch-depth is needed for GitVersion | ||
|
||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: 5.x | ||
|
||
- name: Determine Version | ||
uses: gittools/actions/gitversion/[email protected] | ||
id: gitversion | ||
|
||
- name: Display GitVersion outputs | ||
run: | | ||
echo "Version: ${{ steps.gitversion.outputs.SemVer }}" | ||
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}" | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.x | ||
|
||
- name: Dotnet Restore | ||
run: dotnet restore ./**.sln | ||
|
||
- name: Build Source Projects | ||
run: dotnet build ./**.sln -p:Version='${{ steps.gitversion.outputs.SemVer }}' -c Release | ||
|
||
- name: Pack NuGet Packages | ||
run: dotnet pack ./**.sln -p:Version='${{ steps.gitversion.outputs.SemVer }}' -c Release -o bin/nugetPackages | ||
|
||
- name: Upload NuGet package to GitHub | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nugetPackage | ||
path: bin/nugetPackages | ||
|
||
release: | ||
if: needs.build.outputs.CommitsSinceVersionSource > 0 && github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
steps: | ||
- name: Download nuget package artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: nugetPackage | ||
path: bin/nugetPackages | ||
|
||
- name: Create Release | ||
uses: ncipollo/[email protected] | ||
with: | ||
tag: ${{ needs.build.outputs.Version }} | ||
name: Release ${{ needs.build.outputs.Version }} | ||
body: Released via github actions workflow, see repository README.md | ||
generateReleaseNotes: true | ||
artifacts: "bin/nugetPackages/*.nupkg" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push packages to Nuget | ||
run: | | ||
for file in $(find bin/nugetPackages -type f -name "*.nupkg"); do | ||
echo $file | ||
dotnet nuget push $file --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate | ||
done | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: DOTNET TEST | ||
|
||
on: | ||
|
||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
branches: | ||
- "**" | ||
|
||
jobs: | ||
dotnet-test: | ||
|
||
env: | ||
BUILD_CONFIG: 'Release' | ||
SOLUTION: './**.sln' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.x | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore $SOLUTION | ||
|
||
- name: Build Solution | ||
run: dotnet build $SOLUTION --no-restore | ||
|
||
- name: Test Solution | ||
run: dotnet test $SOLUTION --no-restore --verbosity normal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.