Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 48cbfee49c | |||
| c2d8d34902 | |||
| c7e2c69733 | |||
| c38bc89fa7 |
@@ -0,0 +1,10 @@
|
|||||||
|
**/bin/
|
||||||
|
**/obj/
|
||||||
|
**/*.user
|
||||||
|
**/.vs/
|
||||||
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
.git/
|
||||||
|
.gitea/
|
||||||
|
.github/
|
||||||
|
**/logs/
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# This workflow will build a .NET project
|
# This workflow will build a .NET project
|
||||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
|
# Runs on Gitea Actions (GitHub Actions compatible syntax): https://docs.gitea.com/usage/actions/overview
|
||||||
|
|
||||||
name: .NET
|
name: .NET
|
||||||
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
name: Publish to Gitea Packages
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag_name:
|
||||||
|
description: 'Version tag (e.g., 1.0.0)'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
run-name: "Publish version v${{ inputs.tag_name }} to Gitea Packages"
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
project:
|
||||||
|
- OmegaLeo.HelperLib
|
||||||
|
- OmegaLeo.HelperLib.Changelog
|
||||||
|
- OmegaLeo.HelperLib.Game
|
||||||
|
- OmegaLeo.HelperLib.Documentation
|
||||||
|
- OmegaLeo.HelperLib.Shared
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup .Net Core
|
||||||
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: '8.0.x'
|
||||||
|
- name: Create Nuget Package
|
||||||
|
run: dotnet pack "./${{ matrix.project }}/${{ matrix.project }}.csproj" -c Release /p:Version=${{ inputs.tag_name }}
|
||||||
|
- name: Publish to Gitea Packages
|
||||||
|
run: dotnet nuget push ./${{ matrix.project }}/bin/Release/${{ matrix.project }}.${{ inputs.tag_name }}.nupkg --api-key ${{ secrets.TOKEN }} --source ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/nuget/index.json --skip-duplicate
|
||||||
Executable
+38
@@ -0,0 +1,38 @@
|
|||||||
|
name: Publish Nuget Packages
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
run-name: "Publish version v${{ github.event.release.tag_name }} to nuget"
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
project:
|
||||||
|
- OmegaLeo.HelperLib
|
||||||
|
- OmegaLeo.HelperLib.Changelog
|
||||||
|
- OmegaLeo.HelperLib.Game
|
||||||
|
- OmegaLeo.HelperLib.Documentation
|
||||||
|
- OmegaLeo.HelperLib.Shared
|
||||||
|
- OmegaLeo.HelperLib.Steamworks
|
||||||
|
env:
|
||||||
|
VERSION: ${{ github.event.release.tag_name }}
|
||||||
|
PACKAGE: ./${{ matrix.project }}/bin/Release/${{ matrix.project }}.${{ github.event.release.tag_name }}.nupkg
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup .Net Core
|
||||||
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: '8.0.x'
|
||||||
|
- name: Create Nuget Package
|
||||||
|
run: dotnet pack "./${{ matrix.project }}/${{ matrix.project }}.csproj" -c Release /p:Version=$VERSION /p:PackageReleaseNotes="See ${{ github.server_url }}/${{ github.repository }}/releases/tag/$VERSION"
|
||||||
|
- name: Publish Nuget Package
|
||||||
|
run: dotnet nuget push "$PACKAGE" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
||||||
|
- name: Publish to Gitea Packages
|
||||||
|
run: dotnet nuget push "$PACKAGE" --api-key ${{ secrets.TOKEN }} --source ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/nuget/index.json --skip-duplicate
|
||||||
|
- name: Upload assets to release
|
||||||
|
run: |
|
||||||
|
curl --fail --silent --show-error \
|
||||||
|
-H "Authorization: token ${{ secrets.TOKEN }}" \
|
||||||
|
-F "attachment=@$PACKAGE" \
|
||||||
|
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${{ github.event.release.id }}/assets?name=${{ matrix.project }}.$VERSION.nupkg"
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
name: Publish to GitHub Packages
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
tag_name:
|
|
||||||
description: 'Version tag (e.g., 1.0.0)'
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
run-name: "Publish version v${{ inputs.tag_name }} to GitHub Packages"
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
jobs:
|
|
||||||
publish-helper-lib:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Setup .Net Core
|
|
||||||
uses: actions/setup-dotnet@v1
|
|
||||||
with:
|
|
||||||
dotnet-version: '8.0.x'
|
|
||||||
- name: Create Nuget Package
|
|
||||||
run: dotnet pack "./OmegaLeo.HelperLib/OmegaLeo.HelperLib.csproj" -c Release /p:Version=${{ inputs.tag_name }}
|
|
||||||
- name: Publish to GitHub Packages
|
|
||||||
run: dotnet nuget push ./OmegaLeo.HelperLib/bin/Release/OmegaLeo.HelperLib.${{ inputs.tag_name }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/omegaleo/index.json --skip-duplicate
|
|
||||||
|
|
||||||
publish-changelog-lib:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Setup .Net Core
|
|
||||||
uses: actions/setup-dotnet@v1
|
|
||||||
with:
|
|
||||||
dotnet-version: '8.0.x'
|
|
||||||
- name: Create Nuget Package
|
|
||||||
run: dotnet pack "./OmegaLeo.HelperLib.Changelog/OmegaLeo.HelperLib.Changelog.csproj" -c Release /p:Version=${{ inputs.tag_name }}
|
|
||||||
- name: Publish to GitHub Packages
|
|
||||||
run: dotnet nuget push ./OmegaLeo.HelperLib.Changelog/bin/Release/OmegaLeo.HelperLib.Changelog.${{ inputs.tag_name }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/omegaleo/index.json --skip-duplicate
|
|
||||||
|
|
||||||
publish-game-lib:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Setup .Net Core
|
|
||||||
uses: actions/setup-dotnet@v1
|
|
||||||
with:
|
|
||||||
dotnet-version: '8.0.x'
|
|
||||||
- name: Create Nuget Package
|
|
||||||
run: dotnet pack "./OmegaLeo.HelperLib.Game/OmegaLeo.HelperLib.Game.csproj" -c Release /p:Version=${{ inputs.tag_name }}
|
|
||||||
- name: Publish to GitHub Packages
|
|
||||||
run: dotnet nuget push ./OmegaLeo.HelperLib.Game/bin/Release/OmegaLeo.HelperLib.Game.${{ inputs.tag_name }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/omegaleo/index.json --skip-duplicate
|
|
||||||
|
|
||||||
publish-doc-lib:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Setup .Net Core
|
|
||||||
uses: actions/setup-dotnet@v1
|
|
||||||
with:
|
|
||||||
dotnet-version: '8.0.x'
|
|
||||||
- name: Create Nuget Package
|
|
||||||
run: dotnet pack "./OmegaLeo.HelperLib.Documentation/OmegaLeo.HelperLib.Documentation.csproj" -c Release /p:Version=${{ inputs.tag_name }}
|
|
||||||
- name: Publish to GitHub Packages
|
|
||||||
run: dotnet nuget push ./OmegaLeo.HelperLib.Documentation/bin/Release/OmegaLeo.HelperLib.Documentation.${{ inputs.tag_name }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/omegaleo/index.json --skip-duplicate
|
|
||||||
|
|
||||||
publish-shared-lib:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Setup .Net Core
|
|
||||||
uses: actions/setup-dotnet@v1
|
|
||||||
with:
|
|
||||||
dotnet-version: '8.0.x'
|
|
||||||
- name: Create Nuget Package
|
|
||||||
run: dotnet pack "./OmegaLeo.HelperLib.Shared/OmegaLeo.HelperLib.Shared.csproj" -c Release /p:Version=${{ inputs.tag_name }}
|
|
||||||
- name: Publish to GitHub Packages
|
|
||||||
run: dotnet nuget push ./OmegaLeo.HelperLib.Shared/bin/Release/OmegaLeo.HelperLib.Shared.${{ inputs.tag_name }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/omegaleo/index.json --skip-duplicate
|
|
||||||
@@ -1,149 +0,0 @@
|
|||||||
name: Publish Nuget Packages
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [created]
|
|
||||||
run-name: "Publish version v${{github.event.release.tag_name}} to nuget"
|
|
||||||
jobs:
|
|
||||||
get-release:
|
|
||||||
name: Get Release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Get release
|
|
||||||
id: get_release
|
|
||||||
uses: bruceadams/get-release@v1.2.3
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
|
||||||
outputs:
|
|
||||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
|
||||||
publish-helper-lib:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [get-release]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Setup .Net Core
|
|
||||||
uses: actions/setup-dotnet@v1
|
|
||||||
with:
|
|
||||||
dotnet-version: '8.0.x'
|
|
||||||
- name: Update Project Version
|
|
||||||
run: sed -i "s/\(<Version>\([0-9]\+\.\)\{2\}\)\([0-9]\+\)/\1${{ github.event.release.tag_name }}/" "./OmegaLeo.HelperLib/OmegaLeo.HelperLib.csproj"
|
|
||||||
- name: Create Nuget Package
|
|
||||||
run: dotnet pack "./OmegaLeo.HelperLib/OmegaLeo.HelperLib.csproj" -c Release /p:Version=${{ github.event.release.tag_name }} /p:PackageReleaseNotes="See https://github.com/omegaleo/OmegaLeo.HelperLib/releases/tag/${{ github.event.release.tag_name }}"
|
|
||||||
- name: Publish Nuget Package
|
|
||||||
run: dotnet nuget push ./OmegaLeo.HelperLib/bin/Release/OmegaLeo.HelperLib.${{ github.event.release.tag_name }}.nupkg --api-key ${{ secrets.nuget_api_key }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
|
||||||
- name: Publish to GitHub Packages
|
|
||||||
run: dotnet nuget push ./OmegaLeo.HelperLib/bin/Release/OmegaLeo.HelperLib.${{ github.event.release.tag_name }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/omegaleo/index.json --skip-duplicate
|
|
||||||
- name: Upload assets to release
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ needs.get-release.outputs.upload_url }}
|
|
||||||
asset_path: ./OmegaLeo.HelperLib/bin/Release/OmegaLeo.HelperLib.${{ github.event.release.tag_name }}.nupkg
|
|
||||||
asset_name: OmegaLeo.HelperLib.${{ github.event.release.tag_name }}.nupkg
|
|
||||||
asset_content_type: application/zip
|
|
||||||
publish-changelog-lib:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [ get-release ]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Setup .Net Core
|
|
||||||
uses: actions/setup-dotnet@v1
|
|
||||||
with:
|
|
||||||
dotnet-version: '8.0.x'
|
|
||||||
- name: Update Project Version
|
|
||||||
run: sed -i "s/\(<Version>\([0-9]\+\.\)\{2\}\)\([0-9]\+\)/\1${{ github.event.release.tag_name }}/" "./OmegaLeo.HelperLib.Changelog/OmegaLeo.HelperLib.Changelog.csproj"
|
|
||||||
- name: Create Nuget Package
|
|
||||||
run: dotnet pack "./OmegaLeo.HelperLib.Changelog/OmegaLeo.HelperLib.Changelog.csproj" -c Release /p:Version=${{ github.event.release.tag_name }} /p:PackageReleaseNotes="See https://github.com/omegaleo/OmegaLeo.HelperLib/releases/tag/${{ github.event.release.tag_name }}"
|
|
||||||
- name: Publish Nuget Package
|
|
||||||
run: dotnet nuget push ./OmegaLeo.HelperLib.Changelog/bin/Release/OmegaLeo.HelperLib.Changelog.${{ github.event.release.tag_name }}.nupkg --api-key ${{ secrets.nuget_api_key }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
|
||||||
- name: Publish to GitHub Packages
|
|
||||||
run: dotnet nuget push ./OmegaLeo.HelperLib.Changelog/bin/Release/OmegaLeo.HelperLib.Changelog.${{ github.event.release.tag_name }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/omegaleo/index.json --skip-duplicate
|
|
||||||
- name: Upload assets to release
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ needs.get-release.outputs.upload_url }}
|
|
||||||
asset_path: ./OmegaLeo.HelperLib.Changelog/bin/Release/OmegaLeo.HelperLib.Changelog.${{ github.event.release.tag_name }}.nupkg
|
|
||||||
asset_name: OmegaLeo.HelperLib.Changelog.${{ github.event.release.tag_name }}.nupkg
|
|
||||||
asset_content_type: application/zip
|
|
||||||
publish-game-lib:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [ get-release ]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Setup .Net Core
|
|
||||||
uses: actions/setup-dotnet@v1
|
|
||||||
with:
|
|
||||||
dotnet-version: '8.0.x'
|
|
||||||
- name: Update Project Version
|
|
||||||
run: sed -i "s/\(<Version>\([0-9]\+\.\)\{2\}\)\([0-9]\+\)/\1${{ github.event.release.tag_name }}/" "./OmegaLeo.HelperLib.Game/OmegaLeo.HelperLib.Game.csproj"
|
|
||||||
- name: Create Nuget Package
|
|
||||||
run: dotnet pack "./OmegaLeo.HelperLib.Game/OmegaLeo.HelperLib.Game.csproj" -c Release /p:Version=${{ github.event.release.tag_name }} /p:PackageReleaseNotes="See https://github.com/omegaleo/OmegaLeo.HelperLib/releases/tag/${{ github.event.release.tag_name }}"
|
|
||||||
- name: Publish Nuget Package
|
|
||||||
run: dotnet nuget push ./OmegaLeo.HelperLib.Game/bin/Release/OmegaLeo.HelperLib.Game.${{ github.event.release.tag_name }}.nupkg --api-key ${{ secrets.nuget_api_key }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
|
||||||
- name: Publish to GitHub Packages
|
|
||||||
run: dotnet nuget push ./OmegaLeo.HelperLib.Game/bin/Release/OmegaLeo.HelperLib.Game.${{ github.event.release.tag_name }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/omegaleo/index.json --skip-duplicate
|
|
||||||
- name: Upload assets to release
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ needs.get-release.outputs.upload_url }}
|
|
||||||
asset_path: ./OmegaLeo.HelperLib.Game/bin/Release/OmegaLeo.HelperLib.Game.${{ github.event.release.tag_name }}.nupkg
|
|
||||||
asset_name: OmegaLeo.HelperLib.Game.${{ github.event.release.tag_name }}.nupkg
|
|
||||||
asset_content_type: application/zip
|
|
||||||
publish-doc-lib:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [ get-release ]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Setup .Net Core
|
|
||||||
uses: actions/setup-dotnet@v1
|
|
||||||
with:
|
|
||||||
dotnet-version: '8.0.x'
|
|
||||||
- name: Update Project Version
|
|
||||||
run: sed -i "s/\(<Version>\([0-9]\+\.\)\{2\}\)\([0-9]\+\)/\1${{ github.event.release.tag_name }}/" "./OmegaLeo.HelperLib.Documentation/OmegaLeo.HelperLib.Documentation.csproj"
|
|
||||||
- name: Create Nuget Package
|
|
||||||
run: dotnet pack "./OmegaLeo.HelperLib.Documentation/OmegaLeo.HelperLib.Documentation.csproj" -c Release /p:Version=${{ github.event.release.tag_name }} /p:PackageReleaseNotes="See https://github.com/omegaleo/OmegaLeo.HelperLib/releases/tag/${{ github.event.release.tag_name }}"
|
|
||||||
- name: Publish Nuget Package
|
|
||||||
run: dotnet nuget push ./OmegaLeo.HelperLib.Documentation/bin/Release/OmegaLeo.HelperLib.Documentation.${{ github.event.release.tag_name }}.nupkg --api-key ${{ secrets.nuget_api_key }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
|
||||||
- name: Publish to GitHub Packages
|
|
||||||
run: dotnet nuget push ./OmegaLeo.HelperLib.Documentation/bin/Release/OmegaLeo.HelperLib.Documentation.${{ github.event.release.tag_name }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/omegaleo/index.json --skip-duplicate
|
|
||||||
- name: Upload assets to release
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ needs.get-release.outputs.upload_url }}
|
|
||||||
asset_path: ./OmegaLeo.HelperLib.Documentation/bin/Release/OmegaLeo.HelperLib.Documentation.${{ github.event.release.tag_name }}.nupkg
|
|
||||||
asset_name: OmegaLeo.HelperLib.Documentation.${{ github.event.release.tag_name }}.nupkg
|
|
||||||
asset_content_type: application/zip
|
|
||||||
publish-shared-lib:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [ get-release ]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Setup .Net Core
|
|
||||||
uses: actions/setup-dotnet@v1
|
|
||||||
with:
|
|
||||||
dotnet-version: '8.0.x'
|
|
||||||
- name: Update Project Version
|
|
||||||
run: sed -i "s/\(<Version>\([0-9]\+\.\)\{2\}\)\([0-9]\+\)/\1${{ github.event.release.tag_name }}/" "./OmegaLeo.HelperLib.Shared/OmegaLeo.HelperLib.Shared.csproj"
|
|
||||||
- name: Create Nuget Package
|
|
||||||
run: dotnet pack "./OmegaLeo.HelperLib.Shared/OmegaLeo.HelperLib.Shared.csproj" -c Release /p:Version=${{ github.event.release.tag_name }} /p:PackageReleaseNotes="See https://github.com/omegaleo/OmegaLeo.HelperLib/releases/tag/${{ github.event.release.tag_name }}"
|
|
||||||
- name: Publish Nuget Package
|
|
||||||
run: dotnet nuget push ./OmegaLeo.HelperLib.Shared/bin/Release/OmegaLeo.HelperLib.Shared.${{ github.event.release.tag_name }}.nupkg --api-key ${{ secrets.nuget_api_key }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
|
||||||
- name: Publish to GitHub Packages
|
|
||||||
run: dotnet nuget push ./OmegaLeo.HelperLib.Shared/bin/Release/OmegaLeo.HelperLib.Shared.${{ github.event.release.tag_name }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/omegaleo/index.json --skip-duplicate
|
|
||||||
- name: Upload assets to release
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ needs.get-release.outputs.upload_url }}
|
|
||||||
asset_path: ./OmegaLeo.HelperLib.Shared/bin/Release/OmegaLeo.HelperLib.Shared.${{ github.event.release.tag_name }}.nupkg
|
|
||||||
asset_name: OmegaLeo.HelperLib.Shared.${{ github.event.release.tag_name }}.nupkg
|
|
||||||
asset_content_type: application/zip
|
|
||||||
@@ -4,13 +4,9 @@ obj/
|
|||||||
riderModule.iml
|
riderModule.iml
|
||||||
/_ReSharper.Caches/
|
/_ReSharper.Caches/
|
||||||
/.vs
|
/.vs
|
||||||
<<<<<<< Updated upstream
|
|
||||||
/OmegaLeo.HelperLib.Web
|
|
||||||
=======
|
|
||||||
/OmegaLeo.HelperLib.Web/.config
|
/OmegaLeo.HelperLib.Web/.config
|
||||||
/OmegaLeo.HelperLib.Web/Properties/PublishProfiles
|
/OmegaLeo.HelperLib.Web/Properties/PublishProfiles
|
||||||
/OmegaLeo.HelperLib.Web/publish
|
/OmegaLeo.HelperLib.Web/publish
|
||||||
>>>>>>> Stashed changes
|
|
||||||
/OmegaLeo.HelperLib.Web/OmegaLeo.HelperLib.Web.csproj.user
|
/OmegaLeo.HelperLib.Web/OmegaLeo.HelperLib.Web.csproj.user
|
||||||
|
|
||||||
*.sh
|
*.sh
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Build context is the repository root (the Web project references sibling library projects).
|
||||||
|
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
||||||
|
WORKDIR /src
|
||||||
|
COPY . .
|
||||||
|
RUN dotnet publish "OmegaLeo.HelperLib.Web/OmegaLeo.HelperLib.Web.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS final
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=build /app/publish .
|
||||||
|
# Serilog writes to /app/logs; make it writable for the non-root "app" user.
|
||||||
|
RUN mkdir -p /app/logs && chown -R app:app /app/logs
|
||||||
|
USER app
|
||||||
|
ENV ASPNETCORE_HTTP_PORTS=8080
|
||||||
|
EXPOSE 8080
|
||||||
|
ENTRYPOINT ["dotnet", "OmegaLeo.HelperLib.Web.dll"]
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using Microsoft.AspNetCore.HttpOverrides;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
@@ -5,6 +6,15 @@ var builder = WebApplication.CreateBuilder(args);
|
|||||||
// Add services to the container.
|
// Add services to the container.
|
||||||
builder.Services.AddControllersWithViews();
|
builder.Services.AddControllersWithViews();
|
||||||
|
|
||||||
|
// Trust X-Forwarded-* from the reverse proxy in front of the container, so HTTPS
|
||||||
|
// redirection and HSTS see the original scheme instead of looping on plain HTTP.
|
||||||
|
builder.Services.Configure<ForwardedHeadersOptions>(options =>
|
||||||
|
{
|
||||||
|
options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
|
||||||
|
options.KnownNetworks.Clear();
|
||||||
|
options.KnownProxies.Clear();
|
||||||
|
});
|
||||||
|
|
||||||
// Configure logging
|
// Configure logging
|
||||||
// Configure Serilog
|
// Configure Serilog
|
||||||
Log.Logger = new LoggerConfiguration()
|
Log.Logger = new LoggerConfiguration()
|
||||||
@@ -20,6 +30,8 @@ builder.Host.UseSerilog();
|
|||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
|
app.UseForwardedHeaders();
|
||||||
|
|
||||||
// Configure the HTTP request pipeline.
|
// Configure the HTTP request pipeline.
|
||||||
if (!app.Environment.IsDevelopment())
|
if (!app.Environment.IsDevelopment())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
services:
|
||||||
|
helperlib-web:
|
||||||
|
container_name: helperlib-web
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: OmegaLeo.HelperLib.Web/Dockerfile
|
||||||
|
image: helperlib-web:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
ASPNETCORE_ENVIRONMENT: Production
|
||||||
|
ports:
|
||||||
|
# Cloudflare Tunnel: library.omegaleo.dev -> http://localhost:5001
|
||||||
|
- "${HELPERLIB_WEB_PORT:-5001}:8080"
|
||||||
|
volumes:
|
||||||
|
- helperlib-web-logs:/app/logs
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
helperlib-web-logs:
|
||||||
Reference in New Issue
Block a user