diff --git a/.gitea/config/gitversion.yml b/.gitea/config/gitversion.yml new file mode 100644 index 0000000..57caa9e --- /dev/null +++ b/.gitea/config/gitversion.yml @@ -0,0 +1,9 @@ +next-version: 1.0.0 +mode: ContinuousDeployment +assembly-versioning-scheme: MajorMinorPatch +assembly-file-versioning-scheme: MajorMinorPatch + +branches: + main: + regex: ^main$ + increment: Patch \ No newline at end of file diff --git a/.gitea/readme/icon.png b/.gitea/readme/icon.png new file mode 100644 index 0000000..62189c0 Binary files /dev/null and b/.gitea/readme/icon.png differ diff --git a/.github/Images/Home.png b/.gitea/readme/screenshot.png similarity index 100% rename from .github/Images/Home.png rename to .gitea/readme/screenshot.png diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..86831c4 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,29 @@ +name: Build app + +on: + push: + branches: + - "dev" + paths: + - "VDownload**" + pull_request: + branches: + - "dev" + - "main" + paths: + - "VDownload**" + +jobs: + build: + name: Build + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore \ 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..a845b1c --- /dev/null +++ b/.gitea/workflows/build_publish.yml @@ -0,0 +1,67 @@ +name: Build and publish app + +on: + workflow_dispatch: + branches: + - "main" + push: + branches: + - "main" + paths: + - "VDownload**" + +jobs: + build_version: + name: Build and determine version + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - 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_publish: + name: Pack and publish + needs: build_version + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 7.0.x + - name: Publish + run: dotnet publish -c Release -r win-x64 -p:Platform=x64 -p:PublishTrimmed=false -p:Version=${{needs.build_test_version.outputs.version}} VDownload\\VDownload.csproj + - name: Remove redundant directories + run: rm -r VDownload/bin/x64/Release/net8.0-windows10.0.26100.0/win-x64/publish + - name: Create .ZIP archive + id: archive + uses: ksm2/archive-action@v1 + with: + format: "zip" + name: vdownload_${{needs.build_test_version.outputs.version}} + root-directory: VDownload/bin/x64/Release/net8.0-windows10.0.26100.0/win-x64/ + - name: Create Release + uses: akkuman/gitea-release-action@v1 + with: + tag_name: ${{needs.pack.outputs.version}} + name: ${{needs.pack.outputs.version}} + files: |- + vdownload_${{needs.build_test_version.outputs.version}}.zip \ No newline at end of file diff --git a/.github/config/gitversion.yml b/.github/config/gitversion.yml deleted file mode 100644 index b0eb3bf..0000000 --- a/.github/config/gitversion.yml +++ /dev/null @@ -1,18 +0,0 @@ -next-version: 1.0.0 -assembly-versioning-scheme: MajorMinorPatch -assembly-file-versioning-scheme: MajorMinorPatch - -branches: - master: - regex: ^master$ - mode: ContinuousDelivery - increment: Patch - tag: '' - is-release-branch: true - test: - regex: ^features - mode: ContinuousDelivery - increment: Patch - tag: '' - is-release-branch: true - source-branches: []