From b833b74419bda8ad7ea7049621085a24abfb5ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Schr=C3=B6dinger?= <132720404+Schrodinger71@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:43:48 +0300 Subject: [PATCH 1/5] add test --- .github/workflows/reliese.yml | 64 +++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/reliese.yml diff --git a/.github/workflows/reliese.yml b/.github/workflows/reliese.yml new file mode 100644 index 0000000000..00ae66046f --- /dev/null +++ b/.github/workflows/reliese.yml @@ -0,0 +1,64 @@ +name: Build & Release + +on: + workflow_dispatch: # Позволяет запускать процесс вручную + push: + branches: [ master, staging, trying ] + pull_request: + types: [ opened, reopened, synchronize ] + branches: [ master ] + +jobs: + build: + if: github.actor != 'IanComradeBot' && github.event.pull_request.draft == false + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 8.0.x + + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release + + - name: Run tests + run: dotnet test --configuration Release + + release: + needs: build + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Create Release Archive + run: | + mkdir release + dotnet publish --configuration Release --output ./release + cd release + zip -r ../release.zip . + + - name: Upload Release + uses: actions/upload-artifact@v2 + with: + name: release + path: release.zip + + - name: Create GitHub Release + id: create_release + uses: softprops/action-gh-release@v1 + with: + tag_name: v${{ github.run_number }} + release_name: Release ${{ github.run_number }} + files: release.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 2d1779fe7c7d791201cc5eb3ab15e546331bbb83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Schr=C3=B6dinger?= <132720404+Schrodinger71@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:50:02 +0300 Subject: [PATCH 2/5] Update reliese.yml --- .github/workflows/reliese.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/reliese.yml b/.github/workflows/reliese.yml index 00ae66046f..ad97bdb52d 100644 --- a/.github/workflows/reliese.yml +++ b/.github/workflows/reliese.yml @@ -2,11 +2,6 @@ name: Build & Release on: workflow_dispatch: # Позволяет запускать процесс вручную - push: - branches: [ master, staging, trying ] - pull_request: - types: [ opened, reopened, synchronize ] - branches: [ master ] jobs: build: @@ -17,12 +12,17 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Set up .NET - uses: actions/setup-dotnet@v1 + - name: Setup .NET Core + uses: actions/setup-dotnet@v3.2.0 with: dotnet-version: 8.0.x - - name: Restore dependencies + - name: Get Engine Tag + run: | + cd RobustToolbox + git fetch --depth=1 + + - name: Install dependencies run: dotnet restore - name: Build From 3c9ad6e92d93b94d6c96adc74387e7fd18c48c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Schr=C3=B6dinger?= <132720404+Schrodinger71@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:52:24 +0300 Subject: [PATCH 3/5] Update reliese.yml --- .github/workflows/reliese.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/reliese.yml b/.github/workflows/reliese.yml index ad97bdb52d..3290e85fe7 100644 --- a/.github/workflows/reliese.yml +++ b/.github/workflows/reliese.yml @@ -2,6 +2,11 @@ name: Build & Release on: workflow_dispatch: # Позволяет запускать процесс вручную + push: + branches: [ master, staging, trying ] + pull_request: + types: [ opened, reopened, synchronize ] + branches: [ master ] jobs: build: From 6bdd411a47b76469e7ee6cdc43d2ccb1ce5c4b3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Schr=C3=B6dinger?= <132720404+Schrodinger71@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:55:28 +0300 Subject: [PATCH 4/5] Update reliese.yml --- .github/workflows/reliese.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/reliese.yml b/.github/workflows/reliese.yml index 3290e85fe7..2a1a56d19b 100644 --- a/.github/workflows/reliese.yml +++ b/.github/workflows/reliese.yml @@ -22,6 +22,16 @@ jobs: with: dotnet-version: 8.0.x + - name: Setup submodule + run: | + git submodule update --init --recursive + - name: Pull engine updates + uses: space-wizards/submodule-dependency@v0.1.5 + - name: Update Engine Submodules + run: | + cd RobustToolbox/ + git submodule update --init --recursive + - name: Get Engine Tag run: | cd RobustToolbox From 391e0f0324a4b4a99a137c5abb4e553c3c80ea35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Schr=C3=B6dinger?= <132720404+Schrodinger71@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:14:04 +0300 Subject: [PATCH 5/5] Update reliese.yml --- .github/workflows/reliese.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reliese.yml b/.github/workflows/reliese.yml index 2a1a56d19b..047c9e32fe 100644 --- a/.github/workflows/reliese.yml +++ b/.github/workflows/reliese.yml @@ -1,12 +1,12 @@ name: Build & Release on: - workflow_dispatch: # Позволяет запускать процесс вручную - push: - branches: [ master, staging, trying ] - pull_request: - types: [ opened, reopened, synchronize ] - branches: [ master ] + workflow_dispatch: + schedule: + - cron: '0 6 * * *' + workflow_run: + workflows: [Build & Test Release] + types: [completed] jobs: build: