Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publishing dev builds to myget.org (#4631)
* Added myget publish workflow/action. * Update name * Namechange * Fix modifier * fix mod 2 * Using minver * Update cmd * fix cake script error * more script error fixes * cake version issues * minver version fixed * a small change * getting all history for minver to work with * Setting minor version to increment after RTM tag. We're working towards new minor version by default. * Changed name of CI build.
- Loading branch information
1 parent
829e304
commit 3a35f8c
Showing
5 changed files
with
101 additions
and
6 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
File renamed without changes.
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,65 @@ | ||
name: NUnit.Myget.Publish | ||
env: | ||
MinVerAutoIncrement: minor | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- release | ||
- 'v3' | ||
- myget | ||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
jobs: | ||
build-windows: | ||
name: Windows Build | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: ⤵️ Checkout Source | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: 🛠️ Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
global-json-file: global.json | ||
|
||
- name: 🛠️ Install dotnet tools | ||
run: dotnet tool restore | ||
|
||
- name: 🔨 Build and Test | ||
run: dotnet tool run dotnet-cake --target=Test --test-run-name=Windows --configuration=Release | ||
|
||
- name: 🔨 Windows Specific Tests | ||
run: dotnet test --no-build --configuration=Release src/NUnitFramework/windows-tests/windows-tests.csproj | ||
|
||
- name: 📦 Package | ||
run: dotnet tool run dotnet-cake --target=Package | ||
|
||
- name: 💾 Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Package | ||
path: package | ||
|
||
- name: 💾 Upload test results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Test results (Windows) | ||
path: test-results | ||
# Use always() to always run this step to publish test results when there are test failures | ||
if: ${{ always() }} | ||
|
||
- name: Publish nupkg and snupkg to Myget.org | ||
run: | | ||
foreach($file in (Get-ChildItem package -Recurse -Include *.nupkg)) { | ||
dotnet nuget push $file --api-key "${{ secrets.PUBLISHMYGET }}" --source https://www.myget.org/F/nunit/api/v3/index.json --skip-duplicate | ||
} | ||
foreach($file in (Get-ChildItem "package" -Recurse -Include *.snupkg)) { | ||
dotnet nuget push $file --api-key "${{ secrets.PUBLISHMYGET }}" --source https://www.myget.org/F/nunit/api/v3/index.json --skip-duplicate | ||
} |
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