From 9647dbc8e66d68ffaad54468e7ee6bffc5e37f19 Mon Sep 17 00:00:00 2001 From: Sergey Karmanov Date: Sun, 24 May 2026 19:18:41 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build-plugin.yml | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .gitea/workflows/build-plugin.yml diff --git a/.gitea/workflows/build-plugin.yml b/.gitea/workflows/build-plugin.yml new file mode 100644 index 0000000..526869b --- /dev/null +++ b/.gitea/workflows/build-plugin.yml @@ -0,0 +1,57 @@ +name: Build UniVerse plugin + +on: + push: + branches: + - main + - staging + paths: + - '.gitea/workflows/build-plugin.yml' + - 'SfeduSchedule.Plugin.UniVerse/**' + - 'HeadProject/ModeusSchedule.Abstractions/**' + pull_request: + paths: + - '.gitea/workflows/build-plugin.yml' + - 'SfeduSchedule.Plugin.UniVerse/**' + - 'HeadProject/ModeusSchedule.Abstractions/**' + workflow_dispatch: + +env: + DOTNET_VERSION: 10.0.x + PROJECT_PATH: SfeduSchedule.Plugin.UniVerse/SfeduSchedule.Plugin.UniVerse.csproj + BUILD_CONFIGURATION: Release + ARTIFACT_NAME: SfeduSchedule.Plugin.UniVerse + ARTIFACT_PATH: artifacts/SfeduSchedule.Plugin.UniVerse + +jobs: + build: + name: Build library + runs-on: ubuntu-latest + container: catthehacker/ubuntu:act-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Restore dependencies + run: dotnet restore "${{ env.PROJECT_PATH }}" + + - name: Build plugin + run: dotnet build "${{ env.PROJECT_PATH }}" --configuration "${{ env.BUILD_CONFIGURATION }}" --no-restore + + - name: Prepare artifact + run: | + mkdir -p "${{ env.ARTIFACT_PATH }}" + cp -R "SfeduSchedule.Plugin.UniVerse/bin/${{ env.BUILD_CONFIGURATION }}/net10.0/." "${{ env.ARTIFACT_PATH }}/" + + - name: Upload plugin artifact + uses: actions/upload-artifact@v3 + with: + name: ${{ env.ARTIFACT_NAME }} + path: ${{ env.ARTIFACT_PATH }} + if-no-files-found: error