-
-
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 #262 from Gigas002/net8.0_migration
Net8.0 migration
- Loading branch information
Showing
67 changed files
with
1,472 additions
and
1,013 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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
**/bin/ | ||
**/obj/ | ||
**/obj/ | ||
**/artifacts/ | ||
**/publish/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# These are supported funding model platforms | ||
|
||
github: Gigas002 # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] | ||
patreon: # Replace with a single Patreon username | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
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,21 @@ | ||
name: 'Push nupkg' | ||
description: 'Pushes nuget package to feed' | ||
inputs: | ||
publish-base: | ||
description: 'Directory with publish artifacts (nupkgs/snupkgs)' | ||
api-key: | ||
description: 'API key' | ||
package-feed: | ||
description: 'Package feed' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- id: dotnet-nuget-push | ||
run: | | ||
foreach($file in (Get-ChildItem "${{inputs.publish-base}}/" -Recurse -Include *.nupkg)) | ||
{ | ||
dotnet nuget push $file -k "${{inputs.api-key}}" -s "${{inputs.package-feed}}" --skip-duplicate | ||
} | ||
shell: pwsh |
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,58 @@ | ||
# refer to read_version.ps1 for standalone script | ||
|
||
name: 'Read version' | ||
description: 'Reads version prefix and suffix' | ||
inputs: | ||
build-props-path: | ||
description: 'Path to Directory.Build.props file' | ||
required: false | ||
type: string | ||
default: 'Directory.Build.props' | ||
continious-tag: | ||
description: 'Tag for conrinious docker builds' | ||
required: false | ||
type: string | ||
default: 'latest' | ||
outputs: | ||
prefix: | ||
description: 'Version prefix' | ||
value: ${{steps.version.outputs.prefix}} | ||
suffix: | ||
description: 'Version suffix' | ||
value: ${{steps.version.outputs.suffix}} | ||
build: | ||
description: 'Build number, taken from AssemblyVersion' | ||
value: ${{steps.version.outputs.build}} | ||
docker-tag: | ||
description: 'Latest for ci, vprefix for release' | ||
value: ${{steps.version.outputs.docker-tag}} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- id: version | ||
run: | | ||
$path = "${{inputs.build-props-path}}" | ||
Set-Variable VersionPrefixPath -Option ReadOnly -Value "/Project/PropertyGroup/VersionPrefix" | ||
Set-Variable VersionSuffixPath -Option ReadOnly -Value "/Project/PropertyGroup/VersionSuffix" | ||
Set-Variable AssemblyVersionPath -Option ReadOnly -Value "/Project/PropertyGroup/AssemblyVersion" | ||
$versionPrefix = (Select-Xml -Path "$path" -XPath $VersionPrefixPath).Node.InnerText | ||
$versionSuffix = (Select-Xml -Path "$path" -XPath $VersionSuffixPath).Node.InnerText | ||
$assemblyVersion = (Select-Xml -Path "$path" -XPath $AssemblyVersionPath).Node.InnerText | ||
$buildVersion = $assemblyVersion.Split('.')[-1] | ||
$dockerTag = "" | ||
if ("$versionSuffix") { | ||
$dockerTag = "${{inputs.continious-tag}}" | ||
} | ||
else { | ||
$dockerTag = "v$versionPrefix" | ||
} | ||
Write-Output "prefix=$versionPrefix" >> $env:GITHUB_OUTPUT | ||
Write-Output "suffix=$versionSuffix" >> $env:GITHUB_OUTPUT | ||
Write-Output "build=$buildVersion" >> $env:GITHUB_OUTPUT | ||
Write-Output "docker-tag=$dockerTag" >> $env:GITHUB_OUTPUT | ||
shell: pwsh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,245 @@ | ||
name: build-test-deploy | ||
|
||
on: [push, pull_request] | ||
|
||
concurrency: | ||
group: ${{github.workflow}}-${{github.ref}} | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
|
||
# no point in matrix without deploy tasks | ||
# see discussion: https://github.com/orgs/community/discussions/42335 | ||
|
||
# build-test: | ||
# strategy: | ||
# matrix: | ||
# os: [ubuntu-latest, windows-latest, macos-latest] | ||
# uses: ./.github/workflows/build-test.yml | ||
# with: | ||
# runs-on: ${{ matrix.os }} | ||
|
||
# passing env to jobs | ||
# see: https://github.com/orgs/community/discussions/26671 | ||
|
||
# building tasks | ||
|
||
build-windows: | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
runs-on: windows-latest | ||
dotnet-version: '8.x' | ||
|
||
build-linux: | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
runs-on: ubuntu-latest | ||
dotnet-version: '8.x' | ||
|
||
build-macos: | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
runs-on: macos-latest | ||
dotnet-version: '8.x' | ||
|
||
# testing tasks | ||
|
||
test-windows: | ||
needs: build-windows | ||
uses: ./.github/workflows/test.yml | ||
with: | ||
runs-on: windows-latest | ||
projects: '["GTiff2Tiles.Tests/GTiff2Tiles.Tests.csproj"]' | ||
dotnet-version: '8.x' | ||
secrets: inherit | ||
|
||
test-linux: | ||
needs: build-linux | ||
uses: ./.github/workflows/test.yml | ||
with: | ||
projects: '["GTiff2Tiles.Tests/GTiff2Tiles.Tests.csproj"]' | ||
runs-on: ubuntu-latest | ||
dotnet-version: '8.x' | ||
secrets: inherit | ||
|
||
test-macos: | ||
needs: build-macos | ||
uses: ./.github/workflows/test.yml | ||
with: | ||
projects: '["GTiff2Tiles.Tests/GTiff2Tiles.Tests.csproj"]' | ||
runs-on: macos-latest | ||
dotnet-version: '8.x' | ||
secrets: inherit | ||
|
||
# deploy binaries | ||
|
||
deploy-binaries-windows: | ||
needs: test-windows | ||
if: github.ref == 'refs/heads/master' | ||
uses: ./.github/workflows/deploy-binaries.yml | ||
with: | ||
runs-on: windows-latest | ||
projects: '["GTiff2Tiles.Console/GTiff2Tiles.Console.csproj", "GTiff2Tiles.Avalonia/GTiff2Tiles.Avalonia.csproj"]' | ||
publish-base: 'publish' | ||
continious-tag: 'continious' | ||
dotnet-version: '8.x' | ||
build-props-path: 'Directory.Build.props' | ||
secrets: inherit | ||
|
||
deploy-binaries-linux: | ||
needs: test-linux | ||
if: github.ref == 'refs/heads/master' | ||
uses: ./.github/workflows/deploy-binaries.yml | ||
with: | ||
runs-on: ubuntu-latest | ||
projects: '["GTiff2Tiles.Console/GTiff2Tiles.Console.csproj", "GTiff2Tiles.Avalonia/GTiff2Tiles.Avalonia.csproj"]' | ||
publish-base: 'publish' | ||
continious-tag: 'continious' | ||
dotnet-version: '8.x' | ||
build-props-path: 'Directory.Build.props' | ||
secrets: inherit | ||
|
||
deploy-binaries-macos: | ||
needs: test-macos | ||
if: github.ref == 'refs/heads/master' | ||
uses: ./.github/workflows/deploy-binaries.yml | ||
with: | ||
runs-on: macos-latest | ||
projects: '["GTiff2Tiles.Console/GTiff2Tiles.Console.csproj", "GTiff2Tiles.Avalonia/GTiff2Tiles.Avalonia.csproj"]' | ||
publish-base: 'publish' | ||
continious-tag: 'continious' | ||
dotnet-version: '8.x' | ||
build-props-path: 'Directory.Build.props' | ||
secrets: inherit | ||
|
||
# deploy pages | ||
|
||
deploy-pages-linux: | ||
needs: test-linux | ||
if: github.ref == 'refs/heads/master' | ||
uses: ./.github/workflows/deploy-pages.yml | ||
with: | ||
runs-on: ubuntu-latest | ||
dotnet-version: '8.x' | ||
docfx-json-path: 'docfx.json' | ||
publish-dir: 'docs' | ||
secrets: inherit | ||
|
||
# deploy src | ||
|
||
deploy-src-linux: | ||
needs: test-linux | ||
if: github.ref == 'refs/heads/master' | ||
uses: ./.github/workflows/deploy-src.yml | ||
with: | ||
runs-on: ubuntu-latest | ||
publish-base: 'publish' | ||
continious-tag: 'continious' | ||
build-props-path: 'Directory.Build.props' | ||
secrets: inherit | ||
|
||
# deploy peckages | ||
|
||
deploy-packages-nuget-linux: | ||
needs: test-linux | ||
if: github.ref == 'refs/heads/master' | ||
uses: ./.github/workflows/deploy-packages.yml | ||
with: | ||
runs-on: ubuntu-latest | ||
packages: '["GTiff2Tiles.Core/GTiff2Tiles.Core.csproj"]' | ||
publish-base: 'publish' | ||
package-feed: "https://api.nuget.org/v3/index.json" | ||
dotnet-version: '8.x' | ||
build-props-path: 'Directory.Build.props' | ||
secrets: | ||
TOKEN: ${{secrets.NUGET_API_KEY}} | ||
|
||
deploy-packages-github-linux: | ||
needs: test-linux | ||
if: github.ref == 'refs/heads/master' | ||
uses: ./.github/workflows/deploy-packages.yml | ||
with: | ||
runs-on: ubuntu-latest | ||
packages: '["GTiff2Tiles.Core/GTiff2Tiles.Core.csproj"]' | ||
publish-base: 'publish' | ||
package-feed: "https://nuget.pkg.github.com/${{github.repository_owner}}/index.json" | ||
dotnet-version: '8.x' | ||
build-props-path: 'Directory.Build.props' | ||
secrets: | ||
TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
# deploy docker | ||
|
||
deploy-docker-docker-hub-linux: | ||
needs: test-linux | ||
if: github.ref == 'refs/heads/master' | ||
strategy: | ||
matrix: | ||
project: ["gtiff2tiles-console---Dockerfile"] | ||
uses: ./.github/workflows/deploy-docker.yml | ||
with: | ||
runs-on: ubuntu-latest | ||
registry: 'docker.io' | ||
project: ${{matrix.project}} | ||
build-props-path: 'Directory.Build.props' | ||
continious-tag: 'latest' | ||
username: gigas002 | ||
secrets: | ||
TOKEN: ${{secrets.DOCKER_HUB_TOKEN}} | ||
|
||
deploy-docker-github-linux: | ||
needs: test-linux | ||
if: github.ref == 'refs/heads/master' | ||
strategy: | ||
matrix: | ||
project: ["gtiff2tiles-console---Dockerfile"] | ||
uses: ./.github/workflows/deploy-docker.yml | ||
with: | ||
runs-on: ubuntu-latest | ||
registry: 'ghcr.io' | ||
project: ${{matrix.project}} | ||
build-props-path: 'Directory.Build.props' | ||
continious-tag: 'latest' | ||
username: ${{github.repository_owner}} | ||
secrets: | ||
TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
# snyk security report | ||
|
||
snyk-check-code-linux: | ||
uses: ./.github/workflows/snyk-check-code.yml | ||
if: github.ref == 'refs/heads/master' | ||
with: | ||
runs-on: ubuntu-latest | ||
dotnet-version: '8.x' | ||
secrets: inherit | ||
|
||
# snyk docker images checks | ||
|
||
snyk-check-docker-docker-hub-linux: | ||
needs: deploy-docker-docker-hub-linux | ||
if: github.ref == 'refs/heads/master' | ||
strategy: | ||
matrix: | ||
project: ["gtiff2tiles-console---Dockerfile"] | ||
uses: ./.github/workflows/snyk-check-docker.yml | ||
with: | ||
runs-on: ubuntu-latest | ||
registry: 'docker.io' | ||
project: ${{matrix.project}} | ||
username: gigas002 | ||
secrets: inherit | ||
|
||
snyk-check-docker-github-linux: | ||
needs: deploy-docker-github-linux | ||
if: github.ref == 'refs/heads/master' | ||
strategy: | ||
matrix: | ||
project: ["gtiff2tiles-console---Dockerfile"] | ||
uses: ./.github/workflows/snyk-check-docker.yml | ||
with: | ||
runs-on: ubuntu-latest | ||
registry: 'ghcr.io' | ||
project: ${{matrix.project}} | ||
username: gigas002 | ||
secrets: inherit |
Oops, something went wrong.