Adding release package workflow (#8846)
Some checks failed
Compile / Compile .NET solution (push) Has been cancelled
Compile / Compile Client-side Assets (push) Has been cancelled
SpecFlow Tests / Define Strategy Matrix (push) Has been cancelled
SpecFlow Tests / SpecFlow Tests (push) Has been cancelled

(cherry picked from commit 4268b28d95)
This commit is contained in:
Benedek Farkas
2025-09-29 20:53:30 +02:00
parent 0063c18f7f
commit 8851f622a3
4 changed files with 129 additions and 4 deletions

View File

@@ -0,0 +1,27 @@
name: Build Crowdin Translation Packages
on:
workflow_dispatch:
schedule:
- cron: '0 6 * * *'
jobs:
build-crowdin-translation-packages:
runs-on: ubuntu-24.04
steps:
- name: Orchard CMS
uses: andrii-bodnar/crowdin-request-action@ee7a2af9564d8934b5b4a8427185aaaffee0165e # v0.3.0
with:
route: POST /projects/{projectId}/translations/builds
projectId: 46524
env:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}
- name: Orchard CMS Gallery
uses: andrii-bodnar/crowdin-request-action@ee7a2af9564d8934b5b4a8427185aaaffee0165e # v0.3.0
with:
route: POST /projects/{projectId}/translations/builds
projectId: 63766
env:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}

View File

@@ -17,13 +17,13 @@ jobs:
runs-on: windows-2025 runs-on: windows-2025
steps: steps:
- name: Clone Repository - name: Clone Repository
uses: actions/checkout@v4.1.1 uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Restore NuGet Packages - name: Restore NuGet Packages
run: nuget restore src/Orchard.sln run: nuget restore src/Orchard.sln
- name: Add MSBuild to PATH - name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2 uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
- name: Compile - name: Compile
run: msbuild Orchard.proj /m /v:minimal /t:Compile /p:TreatWarningsAsErrors=true -WarnAsError /p:MvcBuildViews=true run: msbuild Orchard.proj /m /v:minimal /t:Compile /p:TreatWarningsAsErrors=true -WarnAsError /p:MvcBuildViews=true
@@ -69,10 +69,10 @@ jobs:
runs-on: windows-2025 runs-on: windows-2025
steps: steps:
- name: Clone Repository - name: Clone Repository
uses: actions/checkout@v4.1.1 uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup NodeJS - name: Setup NodeJS
uses: actions/setup-node@v4.0.2 uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with: with:
node-version: 7 node-version: 7

39
.github/workflows/release-package.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Release Package
# Builds the release package and uploads it as an artifact.
on:
workflow_dispatch:
jobs:
release-package:
name: Release Package
runs-on: Windows-2025
defaults:
run:
shell: cmd
steps:
- name: Clone Repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Restore NuGet Packages
run: nuget restore src/Orchard.sln
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
- name: Build Precompiled Application
run: msbuild Orchard.proj /m /v:minimal /t:Precompiled
- name: Generate Release Package Name
id: package-name
shell: pwsh
run: |
$packageName = "Orchard-$('${{ github.ref_name }}'.Replace('/', '_'))-${{ github.sha }}"
"package-name=$packageName" >> $Env:GITHUB_OUTPUT
- name: Upload Release Package
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ${{ steps.package-name.outputs.package-name }}
path: .\build\Precompiled
if-no-files-found: error

59
.github/workflows/specflow.yml vendored Normal file
View File

@@ -0,0 +1,59 @@
name: SpecFlow Tests
# Compiles the solution and runs unit tests, as well the SpecFlow tests on the main development branches.
on:
workflow_dispatch:
push:
branches:
- 1.10.x
- dev
schedule:
- cron: '0 0 * * 1' # Every Monday midnight.
jobs:
define-matrix:
name: Define Strategy Matrix
runs-on: ubuntu-24.04
outputs:
branches: ${{ steps.branches.outputs.branches }}
steps:
- name: Define Branches
id: branches
run: |
if [ "${{ github.event_name }}" = "schedule" ]; then
echo 'branches=["1.10.x", "dev"]' >> "$GITHUB_OUTPUT"
else
echo 'branches=["${{ github.ref_name }}"]' >> "$GITHUB_OUTPUT"
fi
compile:
name: SpecFlow Tests
needs: define-matrix
runs-on: windows-2025
strategy:
matrix:
branch: ${{ fromJSON(needs.define-matrix.outputs.branches) }}
fail-fast: false
defaults:
run:
shell: cmd
steps:
- name: Clone Repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{ matrix.branch }}
- name: Restore NuGet Packages
run: nuget restore src/Orchard.sln
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
- name: Compile
run: msbuild Orchard.proj /m /v:minimal /t:Compile /p:MvcBuildViews=true /p:TreatWarningsAsErrors=true -WarnAsError
- name: Test
run: msbuild Orchard.proj /m /v:minimal /t:Test
- name: Spec
run: msbuild Orchard.proj /m /v:minimal /t:Spec