-
Notifications
You must be signed in to change notification settings - Fork 17
chore: Test against .NET 8.0 and update workflows #254
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
5 commits
Select commit
Hold shift + click to select a range
c03f7b1
Add global.json and update workflows
BenjaminMichaelis e50b7a8
Test against .net8.0
BenjaminMichaelis af35183
Update Deps
BenjaminMichaelis f8bd172
Update json slightly
BenjaminMichaelis 860faf9
Update .github/workflows/Deploy
BenjaminMichaelis 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
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,65 @@ | ||
name: Deploy | ||
|
||
on: | ||
release: | ||
types: [created] | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
global-json-file: "./global.json" | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore | ||
|
||
- name: Set Version | ||
run: | | ||
echo "${{ github.ref }}" | ||
$tagVersion = "${{ github.ref }}".substring(11) | ||
echo "buildVersion=$tagVersion.${{ github.run_number }}" >> $env:GITHUB_ENV | ||
echo "nugetVersion=$tagVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
echo "preRelease=false" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
|
||
- name: Pack | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
run: dotnet pack -p:PackageVersion=${{ env.nugetVersion }} --configuration Release -o ${{ github.workspace }}/PackedNuget | ||
|
||
- name: Upload Artifacts | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: NuGet | ||
path: ${{ github.workspace }}/PackedNuget | ||
|
||
deploy: | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
needs: build-and-test | ||
environment: | ||
name: "Production" | ||
url: "https://www.nuget.org/packages/IntelliTect.Analyzers" | ||
name: Push NuGets | ||
|
||
steps: | ||
- name: Download artifact from build job | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: NuGet | ||
|
||
- name: Push NuGet | ||
run: | | ||
$tagVersion = "${{ github.ref }}".substring(11) | ||
echo "::set-output name=TAG_VERSION::$tagVersion" | ||
dotnet nuget push IntelliTect.Analyzers.$tagVersion.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate | ||
id: tag-version |
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 |
---|---|---|
@@ -1,38 +1,43 @@ | ||
name: CodingGuidelines Build | ||
name: Build and Test | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
env: | ||
version: 0.1.10 | ||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
jobs: | ||
automerge: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
steps: | ||
- uses: fastify/github-action-merge-dependabot@v3.6.2 | ||
with: | ||
use-github-auto-merge: true | ||
|
||
build: | ||
runs-on: windows-latest | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup dotnet SDK | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: | | ||
6.0.x | ||
7.0.x | ||
- name: Get Build Information | ||
run: | | ||
pwd | ||
dotnet --info | ||
dotnet --version | ||
- name: Install dependencies | ||
global-json-file: "./global.json" | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore | ||
|
||
- name: Build | ||
run: dotnet build -p:Version="${{ env.version }}" --no-restore | ||
- name: Test | ||
run: dotnet test --no-build --verbosity normal | ||
- name: dotnet pack | ||
run: dotnet pack -p:Version="${{ env.version }}-ci-${{ github.run_number }}" -o ${{ github.workspace }} | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ${{ github.workspace }}/*.nupkg | ||
name: Intellitect.CodingGuidelines | ||
run: dotnet build -p:ContinuousIntegrationBuild=True --no-restore --configuration Release |
22 changes: 11 additions & 11 deletions
22
...yzer/IntelliTect.Analyzer.Integration.Tests/IntelliTect.Analyzer.Integration.Tests.csproj
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
14 changes: 7 additions & 7 deletions
14
IntelliTect.Analyzer/IntelliTect.Analyzer.Test/IntelliTect.Analyzer.Tests.csproj
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
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
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,7 @@ | ||
{ | ||
"sdk": { | ||
"version": "8.0.100", | ||
"rollForward": "minor", | ||
"allowPrerelease": true | ||
} | ||
} |
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.