Compare commits

...

20 Commits

Author SHA1 Message Date
Nick Genovese
5a2ff13c7f fix: wrong msbuild command 2024-12-06 13:15:23 -05:00
Nick Genovese
0839709bb2 feat: removed if statement 2024-12-06 13:07:48 -05:00
Nick Genovese
7cb5b0a0a6 Revert "fix: updated build script"
This reverts commit deb14c63e5.
2024-12-06 13:04:19 -05:00
Nick Genovese
0982edfd83 Revert "feat: messing with a new version action"
This reverts commit c37a9eab53.
2024-12-06 13:00:00 -05:00
Nick Genovese
802fcc65bd Revert "fix: still working on the build"
This reverts commit eb985ba301.
2024-12-06 12:59:55 -05:00
Nick Genovese
eb985ba301 fix: still working on the build 2024-12-06 12:42:09 -05:00
Nick Genovese
c37a9eab53 feat: messing with a new version action 2024-12-06 12:38:11 -05:00
Nick Genovese
deb14c63e5 fix: updated build script 2024-12-06 12:32:20 -05:00
Nick Genovese
322fc4eac6 Revert "fix: added a release branch to release rc"
This reverts commit 99b115e302.
2024-12-06 12:26:59 -05:00
Nick Genovese
7959e504a5 Revert "fix: main branch in release rc"
This reverts commit 322e0d14e3.
2024-12-06 12:26:53 -05:00
Nick Genovese
b25082f8d9 Revert "fix: explicit name to dev prerelease"
This reverts commit 179c4d4526.
2024-12-06 12:26:48 -05:00
Nick Genovese
178d4f5397 Revert "fix: use names for pre-release"
This reverts commit 06b74ed39a.
2024-12-06 12:26:37 -05:00
Nick Genovese
67fe162d5d Revert "fix: still working on builds"
This reverts commit 7384d5db61.
2024-12-06 12:26:32 -05:00
Nick Genovese
7384d5db61 fix: still working on builds 2024-12-06 12:14:54 -05:00
Nick Genovese
06b74ed39a fix: use names for pre-release 2024-12-06 12:07:04 -05:00
Nick Genovese
179c4d4526 fix: explicit name to dev prerelease 2024-12-06 11:56:19 -05:00
Nick Genovese
322e0d14e3 fix: main branch in release rc 2024-12-06 11:53:52 -05:00
Nick Genovese
99b115e302 fix: added a release branch to release rc 2024-12-06 11:52:14 -05:00
Nick Genovese
f91ca7807c feat: working on updated build 2024-12-06 11:49:30 -05:00
Nick Genovese
64b01e03a7 feat: added in some branch logging to test 2024-12-06 11:32:03 -05:00
2 changed files with 68 additions and 16 deletions

View File

@@ -2,11 +2,6 @@ name: Branch Build Using Docker
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
@@ -22,7 +17,7 @@ env:
jobs:
Build_Project_4-Series:
runs-on: windows-latest
steps:
steps:
- uses: actions/checkout@v3
- name: Set Version Number
id: setVersion
@@ -34,6 +29,8 @@ jobs:
$phase = ""
$newVersionString = ""
Write-Host "Current GitHub Ref: $Env:GITHUB_REF"
switch -regex ($Env:GITHUB_REF) {
'^refs\/pull\/*.' {
$phase = 'beta';
@@ -57,28 +54,29 @@ jobs:
$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
}
Write-Host "Version to be used: $newVersionString"
Write-Host "Build Phase: $phase"
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
- name: Build Solution
run: msbuild .\$($Env:SOLUTION_FILE).sln /p:Platform="Any CPU" /p:Configuration="Debug" /p:Version="${{ steps.setVersion.outputs.version }}" -m
- name: Pack Solution
run: dotnet pack .\$($Env:SOLUTION_FILE).sln --configuration $env:BUILD_TYPE --output ./output /p:Version="${{ steps.setVersion.outputs.version }}"
- name: Create tag for non-rc builds
if: contains(steps.setVersion.outputs.version, 'alpha')
if: ${{ !contains(steps.setVersion.outputs.version, 'rc') }}
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)'
@@ -86,11 +84,11 @@ jobs:
prerelease: ${{contains('debug', env.BUILD_TYPE)}}
tag: ${{ steps.setVersion.outputs.version }}
- name: Setup Nuget
run: |
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
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
run: nuget push .\output\*.nupkg -Source github

54
.releaserc.json Normal file
View File

@@ -0,0 +1,54 @@
{
"branches": [
{
"name": "development-2.0.0",
"prerelease": true
},
{
"name": "feature-2.0.0/*",
"prerelease": "beta"
},
{
"name": "hotfix-2.0.0/*",
"prerelease": "patch"
},
{
"name": "release-2.0.0/*",
"prerelease": "rc"
}
],
"plugins": [
"@semantic-release/commit-analyzer",
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{ "type": "feat", "section": "🚀 Features" },
{ "type": "fix", "section": "🐛 Bug Fixes" },
{ "type": "chore", "section": "🧹 Maintenance" },
{ "type": "docs", "section": "📚 Documentation" },
{ "type": "style", "section": "💎 Code Style" },
{ "type": "refactor", "section": "🔨 Refactoring" },
{ "type": "perf", "section": "⚡ Performance Improvements" },
{ "type": "test", "section": "✅ Tests" }
]
}
}
],
[
"@semantic-release/changelog",
{
"changelogTitle": "# 📦 Release History\n\nAll notable changes to this project will be documented in this file."
}
],
[
"@semantic-release/exec",
{
"verifyReleaseCmd": "echo \"newVersion=true\" >> $GITHUB_OUTPUT",
"publishCmd": "echo \"version=${nextRelease.version}\" >> $GITHUB_OUTPUT && echo \"tag=${nextRelease.gitTag}\" >> $GITHUB_OUTPUT && echo \"type=${nextRelease.type}\" >> $GITHUB_OUTPUT && echo \"channel=${nextRelease.channel}\" >> $GITHUB_OUTPUT"
}
]
]
}