Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into Enhancement/ActionsMigration
Browse files Browse the repository at this point in the history
amanpras committed Oct 28, 2024
2 parents f311c76 + c28b884 commit 684631c
Showing 34 changed files with 475 additions and 1,277 deletions.
93 changes: 64 additions & 29 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,71 @@
# This GitHub Actions workflow is named "CD" and is triggered manually via the `workflow_dispatch` event.
# It accepts the following inputs:
# - major: Year (number, required, default: '24')
# - minor: Release (number, required, default: '4')
# - build: Beta (number, required, default: '0')
# - revision: Alpha (number, required, default: '0')
# - SSLCert: Add Certificate (choice, required, default: 'No', options: ['Yes', 'No'])
#
# The workflow consists of the following jobs:
# 1. Create-version-Number:
# - Runs on `ubuntu-latest`.
# - Generates version numbers and tags based on the input values.
# - Outputs `version_number` and `version_tag`.
# - Caches the generated version text file.
#
# 2. CI:
# - Depends on the `Create-version-Number` job.
# - Uses the `.github/workflows/CI.yml` workflow.
# - Inherits secrets.
#
# 3. Release:
# - Depends on the `CI` job.
# - Uses the `.github/workflows/Release.yml` workflow.
# - Inherits secrets.
#
# 4. Deploy:
# - Depends on the `Release` job.
# - Uses the `.github/workflows/Deploy.yml` workflow.
#
# 5. Docker:
# - Depends on the `CI` job.
# - Uses the `.github/workflows/Docker.yml` workflow.
# - Inherits secrets.

name: CD

on:
# Trigger the workflow manually with the `workflow_dispatch` event
workflow_dispatch:
inputs:
major:
description: Year
type: number
required: true
default: '24'
minor:
description: Release
type: number
required: true
default: '4'
build:
description: Beta
type: number
required: true
default: '0'
revision:
description: Alpha
type: number
required: true
default: '0'
SSLCert:
description: "Add Certificate"
type: choice
required: true
default: 'No'
options:
- 'Yes'
- 'No'
inputs:
major:
description: Year # The year of the release, e.g., 24 for 2024
type: number
required: true
default: '24'
minor:
description: Release # The minor version of the release, e.g., 4 for the fourth release of the year
type: number
required: true
default: '4'
build:
description: Beta # The build number, typically used for beta versions
type: number
required: true
default: '0'
revision:
description: Alpha # The revision number, typically used for alpha versions
type: number
required: true
default: '0'
SSLCert:
description: "Add Certificate" # Option to add an SSL certificate
type: choice
required: true
default: 'No'
options:
- 'Yes' # Add SSL certificate
- 'No' # Do not add SSL certificate
jobs:
Create-version-Number:
runs-on: ubuntu-latest
4 changes: 2 additions & 2 deletions .github/workflows/CI-2.yml
Original file line number Diff line number Diff line change
@@ -21,10 +21,10 @@ jobs:
Build:
name: Build Stage
# needs: Codacy
uses: ./.github/workflows/GingerBuild-2.yml
uses: ./.github/workflows/GingerBuild.yml

Test:
name: Test Stage
needs: Build
uses: ./.github/workflows/GingerTests-2.yml
uses: ./.github/workflows/GingerTests.yml
secrets: inherit
104 changes: 0 additions & 104 deletions .github/workflows/GingerBuild-2.yml

This file was deleted.

36 changes: 23 additions & 13 deletions .github/workflows/GingerBuild.yml
Original file line number Diff line number Diff line change
@@ -14,11 +14,14 @@ jobs:
# ------------------------------------------------------------------------------------------------------
# Createin version Tag & Number variables - only for CD Job
# ------------------------------------------------------------------------------------------------------
- name: Download Version Artifacts
if: ${{github.workflow == 'CD'}}
uses: actions/download-artifact@v3
- name: Restore Version text file
if: ${{github.workflow == 'CD'}}
uses: actions/cache@v3.2.6
with:
name: ginger-version
path: ./version.txt
key: cache-version-${{ github.run_number }}
enableCrossOsArchive:
true

- name: Create variables from Artifacts file
if: ${{github.workflow == 'CD'}}
@@ -50,12 +53,12 @@ jobs:
echo $save > .\Ginger\GingerInstallerScriptGithub.iss
# ------------------------------------------------------------------------------------------------------
# Install .Net core SDK 6.0.301
# Install .Net core SDK 8.0.100
# ------------------------------------------------------------------------------------------------------
- name: 'Install .NET Core'
- name: 'Install .NET 8'
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.x.x
dotnet-version: 8.0.100

# ------------------------------------------------------------------------------------------------------
# Install Nuget tool v1.0.5
@@ -83,12 +86,19 @@ jobs:
# ------------------------------------------------------------------------------------------------------
- name: 'Publish GingerRuntime'
run: dotnet publish ./Ginger/GingerRuntime/GingerRuntime.csproj --runtime linux-x64 --self-contained true -c Release

# ------------------------------------------------------------------------------------------------------
# Upload Artifacts
# ------------------------------------------------------------------------------------------------------
- name: 'Upload static site content'
uses: actions/upload-artifact@v3
# ------------------------------------------------------------------------------------------------------
- name: Cache static site content
id: cache
uses: actions/cache@v3.2.6
with:
name: ginger-artifact
path: ./
path:
./**
key:
cache-site-${{ github.run_number }}
enableCrossOsArchive:
true


13 changes: 0 additions & 13 deletions .github/workflows/GingerTests-2.yml

This file was deleted.

10 changes: 4 additions & 6 deletions .github/workflows/GingerTests.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
name: Ginger-Tests

on:
workflow_call

jobs:
windows:
uses: ./.github/workflows/WindowsTest.yml
secrets: inherit

Linux:
uses: ./.github/workflows/LinuxTest.yml

# MacOS:
# uses: ./.github/workflows/MacOSTest.yml
MacOS:
uses: ./.github/workflows/MacOSTest.yml
Loading

0 comments on commit 684631c

Please sign in to comment.