diff --git a/.github/config/gitversion.yml b/.gitea/config/gitversion.yml similarity index 89% rename from .github/config/gitversion.yml rename to .gitea/config/gitversion.yml index 57caa9e..aa3a017 100644 --- a/.github/config/gitversion.yml +++ b/.gitea/config/gitversion.yml @@ -6,4 +6,4 @@ assembly-file-versioning-scheme: MajorMinorPatch branches: main: regex: ^main$ - increment: Patch \ No newline at end of file + increment: Patch diff --git a/.gitea/readme/icon.png b/.gitea/readme/icon.png new file mode 100644 index 0000000..febedfd Binary files /dev/null and b/.gitea/readme/icon.png differ diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..008076b --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,34 @@ +name: Build + +on: + push: + branches: + - "dev" + paths: + - "TimetableDesigner.Backend.Events.Extensions.AspNetCore.OpenApi**" + pull_request: + branches: + - "dev" + - "main" + paths: + - "TimetableDesigner.Backend.Events.Extensions.AspNetCore.OpenApi**" + +jobs: + build: + name: Build + runs-on: linux + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.x + - name: Add package source + run: dotnet nuget add source --name gitea --username TimetableDesigner --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text https://repos.mateuszskoczek.com/api/packages/TimetableDesigner/nuget/index.json + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Create NuGet package + run: dotnet pack -c Debug --output ./ \ No newline at end of file diff --git a/.gitea/workflows/build_publish.yml b/.gitea/workflows/build_publish.yml new file mode 100644 index 0000000..03853b2 --- /dev/null +++ b/.gitea/workflows/build_publish.yml @@ -0,0 +1,100 @@ +name: Build and publish package + +on: + workflow_dispatch: + branches: + - "main" + push: + branches: + - "main" + paths: + - "TimetableDesigner.Backend.Events.Extensions.AspNetCore.OpenApi**" + +jobs: + build: + name: Build + runs-on: linux + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.x + - name: Add package source + run: dotnet nuget add source --name gitea --username TimetableDesigner --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text https://repos.mateuszskoczek.com/api/packages/TimetableDesigner/nuget/index.json + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + version: + name: Determine version + runs-on: linux + needs: build + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 10.0.x + - name: Setup GitVersion + uses: gittools/actions/gitversion/setup@v4.2.0 + with: + versionSpec: 6.4.x + - name: Determine version + uses: gittools/actions/gitversion/execute@v4.2.0 + id: gitversion + with: + configFilePath: ./.gitea/config/gitversion.yml + outputs: + version: ${{ steps.gitversion.outputs.SemVer }} + pack: + name: Pack + runs-on: linux + needs: version + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 10.0.x + - name: Add package source + run: dotnet nuget add source --name gitea --username TimetableDesigner --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text https://repos.mateuszskoczek.com/api/packages/TimetableDesigner/nuget/index.json + - name: Create NuGet package + run: dotnet pack -c Release -p:Version=${{needs.version.outputs.version}} -p:PackageVersion=${{needs.version.outputs.version}} --output ./ + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: nuget + path: ./TimetableDesigner.Backend.Events.Extensions.AspNetCore.OpenApi.${{needs.version.outputs.version}}.nupkg + outputs: + version: ${{needs.version.outputs.version}} + publish: + name: Publish + runs-on: linux + needs: pack + steps: + - name: Download artifact + uses: actions/download-artifact@v3 + with: + name: nuget + path: ./ + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 10.0.x + - name: Add package source + run: dotnet nuget add source --name gitea --username TimetableDesigner --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text https://repos.mateuszskoczek.com/api/packages/TimetableDesigner/nuget/index.json + - name: Publish + run: dotnet nuget push ./TimetableDesigner.Backend.Events.Extensions.AspNetCore.OpenApi.${{needs.pack.outputs.version}}.nupkg --source gitea --api-key ${{ secrets.PACKAGES_WRITE_TOKEN }} --skip-duplicate + - name: Create Release + uses: akkuman/gitea-release-action@v1 + with: + tag_name: ${{needs.pack.outputs.version}} + name: ${{needs.pack.outputs.version}} + files: |- + TimetableDesigner.Backend.Events.Extensions.AspNetCore.OpenApi.${{needs.pack.outputs.version}}.nupkg \ No newline at end of file diff --git a/.github/workflows/pull_request_dev.yml b/.github/workflows/pull_request_dev.yml deleted file mode 100644 index a26d922..0000000 --- a/.github/workflows/pull_request_dev.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Build NuGet package on dev branch pull request - -on: - pull_request: - branches: - - "dev" - paths: - - "TimetableDesigner.Backend.Events.Extensions.AspNetCore.OpenApi**" - -jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v6.0.2 - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 10.0.x - - name: Add source - run: dotnet nuget add source --username TimetableDesigner --password ${{secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/TimetableDesigner/index.json" - - name: Build - run: dotnet build diff --git a/.github/workflows/pull_request_main.yml b/.github/workflows/pull_request_main.yml deleted file mode 100644 index 7520567..0000000 --- a/.github/workflows/pull_request_main.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Build NuGet package on main branch pull request - -on: - pull_request: - branches: - - "main" - paths: - - "TimetableDesigner.Backend.Events.Extensions.AspNetCore.OpenApi**" - -jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v6.0.2 - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 10.0.x - - name: Add source - run: dotnet nuget add source --username TimetableDesigner --password ${{secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/TimetableDesigner/index.json" - - name: Build - run: dotnet build diff --git a/.github/workflows/push_dev.yml b/.github/workflows/push_dev.yml deleted file mode 100644 index aecf12a..0000000 --- a/.github/workflows/push_dev.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Build NuGet package on dev branch push - -on: - push: - branches: - - "dev" - paths: - - "TimetableDesigner.Backend.Events.Extensions.AspNetCore.OpenApi**" - -jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v6.0.2 - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 10.0.x - - name: Add source - run: dotnet nuget add source --username TimetableDesigner --password ${{secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/TimetableDesigner/index.json" - - name: Build - run: dotnet build diff --git a/.github/workflows/push_main.yml b/.github/workflows/push_main.yml deleted file mode 100644 index 86d3f90..0000000 --- a/.github/workflows/push_main.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: Build NuGet package on main branch push - -on: - push: - branches: - - "main" - paths: - - "TimetableDesigner.Backend.Events.Extensions.AspNetCore.OpenApi**" - -jobs: - build: - name: Build and pack - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v6.0.2 - with: - fetch-depth: 0 - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 10.0.x - - name: Add source - run: dotnet nuget add source --username TimetableDesigner --password ${{secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/TimetableDesigner/index.json" - - name: Build - run: dotnet build - - name: Setup GitVersion - uses: gittools/actions/gitversion/setup@v4.2.0 - with: - versionSpec: 6.4.x - - name: Determine version - uses: gittools/actions/gitversion/execute@v4.2.0 - id: gitversion - with: - configFilePath: ./.github/config/gitversion.yml - - name: Create NuGet package - run: dotnet pack -c Release -p:Version=${{steps.gitversion.outputs.SemVer}} -p:PackageVersion=${{steps.gitversion.outputs.SemVer}} --output ${{ github.workspace}}/nuget - - name: Upload artifact - uses: actions/upload-artifact@v6 - with: - name: nuget - path: ${{ github.workspace}}/nuget/*.nupkg - outputs: - version: ${{ steps.gitversion.outputs.SemVer }} - publish: - name: Publish - permissions: write-all - runs-on: ubuntu-latest - needs: build - steps: - - name: Download artifact - uses: actions/download-artifact@v6 - with: - name: nuget - path: ${{ github.workspace}}/nuget - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 10.0.x - - name: Add source - run: dotnet nuget add source --username TimetableDesigner --password ${{secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/TimetableDesigner/index.json" - - name: Publish - run: dotnet nuget push ${{ github.workspace}}/nuget/*.nupkg --source "github" --api-key ${{ secrets.NUGET_REGISTRY_API_KEY }} --skip-duplicate - - name: Create Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{needs.build.outputs.version}} - release_name: ${{needs.build.outputs.version}} - draft: false - prerelease: false - - diff --git a/README.md b/README.md new file mode 100644 index 0000000..cb539f6 --- /dev/null +++ b/README.md @@ -0,0 +1,91 @@ +
![]()
TimetableDesigner.Backend.Events is collection of NuGet packages (and NuGet package itself) that support communication between microservices in the TimetableDesigner project using message queues. This NuGet package contains initialization extensions methods for ASP.NET Core Web API.
+ +--- + +## Informations + +> [!Important] +> **For Github users:** +> +> This is only mirror repository. All changes are first uploaded to the repository here. Releases are also published on original repository. However, Github repository handles issues and pull requests for better accessibility. + +## NuGet registry status + +