-
Notifications
You must be signed in to change notification settings - Fork 0
Remove IntelliWait, use Github Actions for deployment, minor updates #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains hidden or 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,34 @@ | ||
| name: Build and Test | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: pwsh | ||
|
|
||
| jobs: | ||
| build-and-test: | ||
| name: build-and-test on ${{matrix.os}} | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest, macOS-latest] | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v2 | ||
| with: | ||
| dotnet-version: | | ||
| 3.1.x | ||
| 6.x | ||
| - name: Restore dependencies | ||
| run: dotnet restore | ||
| - name: Build | ||
| run: dotnet build -p:ContinuousIntegrationBuild=True --no-restore --configuration Release | ||
| - name: Test | ||
| run: dotnet test --no-build --configuration Release --verbosity normal |
This file contains hidden or 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,75 @@ | ||
| name: Deploy | ||
|
|
||
| on: | ||
| release: | ||
| types: [created] | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: pwsh | ||
|
|
||
| env: | ||
| baseVersion: 1.0.0 | ||
|
|
||
| jobs: | ||
| build-and-test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v2 | ||
| with: | ||
| dotnet-version: | | ||
| 3.1.x | ||
| 6.x | ||
| - name: Restore dependencies | ||
| run: dotnet restore | ||
| - name: Set Version | ||
| run: | | ||
| echo "${{ github.ref }}" | ||
| if ("${{ github.ref }}".startsWith("refs/tags/v")) { | ||
| $tagVersion = "${{ github.ref }}".substring(11) | ||
| echo "buildVersion=$tagVersion.${{ github.run_number }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
| echo "nugetVersion=$tagVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
| echo "preRelease=false" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
| } else { | ||
| echo "buildVersion=${{ env.baseVersion }}.${{ github.run_number }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
| echo "nugetVersion=${{ env.baseVersion }}-ci${{ github.run_number }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
| } | ||
| - name: Build | ||
| run: dotnet build -p:Version=${{ env.buildVersion }} -p:ContinuousIntegrationBuild=True --no-restore --configuration Release | ||
| - name: Test | ||
| run: dotnet test --no-build --configuration Release --verbosity normal | ||
| - name: Pack | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| run: dotnet pack -p:PackageVersion=${{ env.nugetVersion }} --configuration Release -o ${{env.DOTNET_ROOT}}/IntelliTect.UtilitiesPack --no-build | ||
| - name: Upload Artifacts | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| uses: actions/upload-artifact@v2 | ||
| with: | ||
| name: NuGet | ||
| path: ${{env.DOTNET_ROOT}}/IntelliTect.UtilitiesPack | ||
|
|
||
| deploy: | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| runs-on: ubuntu-latest | ||
| needs: build-and-test | ||
| environment: | ||
| name: 'Production' | ||
| steps: | ||
| - name: Download artifact from build job | ||
| uses: actions/download-artifact@v2 | ||
| with: | ||
| name: NuGet | ||
| - name: Push NuGet | ||
| run: | | ||
| $tagVersion = "${{ github.ref }}".substring(11) | ||
| echo '::set-output name=TAG_VERSION::$tagVersion' | ||
| dotnet nuget push IntelliTect.Utilities.$tagVersion.nupkg --source https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate | ||
Keboo marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| id: tag-version | ||
| - name: Upload nupkg to Releases | ||
| uses: softprops/action-gh-release@v1 | ||
| with: | ||
| fail_on_unmatched_files: true | ||
| generate_release_notes: true | ||
| files: IntelliTect.Utilities.${{ steps.tag-version.outputs.TAG_VERSION }}.nupkg | ||
This file was deleted.
Oops, something went wrong.
151 changes: 0 additions & 151 deletions
151
IntelliTect.IntelliWait.Tests/ExpectedExceptionsTests.cs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
IntelliTect.IntelliWait.Tests/IntelliTect.IntelliWait.Tests.csproj
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.