mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
revert
This commit is contained in:
102
.github/workflows/docker.yml
vendored
102
.github/workflows/docker.yml
vendored
@@ -34,100 +34,7 @@ jobs:
|
|||||||
$phase = ""
|
$phase = ""
|
||||||
$newVersionString = ""
|
$newVersionString = ""
|
||||||
|
|
||||||
switch -regex ($Env:GITHUB_REF) {name: Branch Build Using Docker
|
switch -regex ($Env:GITHUB_REF) {
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- feature-2.0.0/*
|
|
||||||
- hotfix-2.0.0/*
|
|
||||||
- release-2.0.0/*
|
|
||||||
- development-2.0.0
|
|
||||||
|
|
||||||
env:
|
|
||||||
# solution path doesn't need slashes unless there it is multiple folders deep
|
|
||||||
# solution name does not include extension. .sln is assumed
|
|
||||||
SOLUTION_PATH: .
|
|
||||||
SOLUTION_FILE: PepperDash.Essentials
|
|
||||||
# Do not edit this, we're just creating it here
|
|
||||||
VERSION: 0.0.0-buildtype-buildnumber
|
|
||||||
# Defaults to debug for build type
|
|
||||||
BUILD_TYPE: Debug
|
|
||||||
# Defaults to main as the release branch. Change as necessary
|
|
||||||
RELEASE_BRANCH: main
|
|
||||||
jobs:
|
|
||||||
Build_Project_4-Series:
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Set Version Number
|
|
||||||
id: setVersion
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
$latestVersion = [version]"2.0.0"
|
|
||||||
|
|
||||||
$newVersion = [version]$latestVersion
|
|
||||||
$phase = ""
|
|
||||||
$newVersionString = ""
|
|
||||||
|
|
||||||
switch -regex ($Env:GITHUB_REF) {
|
|
||||||
'^refs\/pull\/*.' {
|
|
||||||
$phase = 'beta';
|
|
||||||
$newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
|
|
||||||
}
|
|
||||||
'^refs\/heads\/hotfix-2.0.0\/*.' {
|
|
||||||
$phase = 'hotfix'
|
|
||||||
$newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
|
|
||||||
}
|
|
||||||
'^refs\/heads\/release-2.0.0\/*.' {
|
|
||||||
$splitRef = $Env:GITHUB_REF -split "/"
|
|
||||||
$version = [version]($splitRef[-1] -replace "v", "")
|
|
||||||
$phase = 'rc'
|
|
||||||
$newVersionString = "{0}-{1}-{2}" -f $version, $phase, $Env:GITHUB_RUN_NUMBER
|
|
||||||
}
|
|
||||||
'^refs\/heads\/feature-2.0.0\/*.' {
|
|
||||||
$phase = 'alpha'
|
|
||||||
$newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
|
|
||||||
}
|
|
||||||
'development-2.0.0' {
|
|
||||||
$phase = 'beta'
|
|
||||||
$newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
|
|
||||||
}
|
|
||||||
}
|
|
||||||
echo "version=$newVersionString" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
|
|
||||||
- name: Setup MS Build
|
|
||||||
uses: microsoft/setup-msbuild@v1.1
|
|
||||||
- name: restore Nuget Packages
|
|
||||||
run: nuget restore .\$($Env:SOLUTION_FILE).sln
|
|
||||||
# Build the solutions in the docker image
|
|
||||||
- name: Build Solution
|
|
||||||
run: msbuild .\$($Env:SOLUTION_FILE).sln /p:Platform="Any CPU" /p:Configuration="Debug" /p:Version="${{ steps.setVersion.outputs.version }}" -m
|
|
||||||
- name: Create tag for non-rc builds
|
|
||||||
if: contains(steps.setVersion.outputs.version, 'alpha')
|
|
||||||
run: |
|
|
||||||
git tag ${{ steps.setVersion.outputs.version }}
|
|
||||||
git push --tags origin
|
|
||||||
# Create the release on the source repo
|
|
||||||
- name: Create Release
|
|
||||||
id: create_release
|
|
||||||
# if: contains(steps.setVersion.outputs.version,'-rc-') ||
|
|
||||||
# contains(steps.setVersion.outputs.version,'-hotfix-') ||
|
|
||||||
# contains(steps.setVersion.outputs.version, '-beta-')
|
|
||||||
uses: ncipollo/release-action@v1
|
|
||||||
with:
|
|
||||||
artifacts: 'output\**\*.*(cpz|cplz)'
|
|
||||||
generateReleaseNotes: true
|
|
||||||
prerelease: ${{contains('debug', env.BUILD_TYPE)}}
|
|
||||||
tag: ${{ steps.setVersion.outputs.version }}
|
|
||||||
- name: Setup Nuget
|
|
||||||
run: |
|
|
||||||
nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username pepperdash -password ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
nuget setApiKey ${{ secrets.GITHUB_TOKEN }} -Source github
|
|
||||||
nuget setApiKey ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json
|
|
||||||
- name: Publish to Nuget
|
|
||||||
run: nuget push .\output\*.nupkg -Source https://api.nuget.org/v3/index.json
|
|
||||||
- name: Publish to Github Nuget
|
|
||||||
run: nuget push .\output\*.nupkg -Source github
|
|
||||||
'^refs\/pull\/*.' {
|
'^refs\/pull\/*.' {
|
||||||
$phase = 'beta';
|
$phase = 'beta';
|
||||||
$newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
|
$newVersionString = "{0}-{1}-{2}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
|
||||||
@@ -158,7 +65,7 @@ jobs:
|
|||||||
run: nuget restore .\$($Env:SOLUTION_FILE).sln
|
run: nuget restore .\$($Env:SOLUTION_FILE).sln
|
||||||
# Build the solutions in the docker image
|
# Build the solutions in the docker image
|
||||||
- name: Build Solution
|
- name: Build Solution
|
||||||
run: msbuild .\$($Env:SOLUTION_FILE).sln /p:Platform="Any CPU" /p:Configuration="Debug" /p:Version="${{ steps.setVersion.outputs.version }}" /p:PackageOutputPath=".\output\nuget" -m
|
run: msbuild .\$($Env:SOLUTION_FILE).sln /p:Platform="Any CPU" /p:Configuration="Debug" /p:Version="${{ steps.setVersion.outputs.version }}" -m
|
||||||
- name: Create tag for non-rc builds
|
- name: Create tag for non-rc builds
|
||||||
if: contains(steps.setVersion.outputs.version, 'alpha')
|
if: contains(steps.setVersion.outputs.version, 'alpha')
|
||||||
run: |
|
run: |
|
||||||
@@ -182,7 +89,6 @@ jobs:
|
|||||||
nuget setApiKey ${{ secrets.GITHUB_TOKEN }} -Source github
|
nuget setApiKey ${{ secrets.GITHUB_TOKEN }} -Source github
|
||||||
nuget setApiKey ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json
|
nuget setApiKey ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json
|
||||||
- name: Publish to Nuget
|
- name: Publish to Nuget
|
||||||
run: nuget push .\output\nuget\*.nupkg -Source https://api.nuget.org/v3/index.json
|
run: nuget push .\output\*.nupkg -Source https://api.nuget.org/v3/index.json
|
||||||
|
|
||||||
- name: Publish to Github Nuget
|
- name: Publish to Github Nuget
|
||||||
run: nuget push .\output\nuget\*.nupkg -Source github
|
run: nuget push .\output\*.nupkg -Source github
|
||||||
Reference in New Issue
Block a user