-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: now pushes the tag whenever not rc
- Loading branch information
1 parent
134e8ba
commit e29e800
Showing
1 changed file
with
9 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ env: | |
jobs: | ||
Build_Project_4-Series: | ||
runs-on: windows-latest | ||
steps: | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set Version Number | ||
id: setVersion | ||
|
@@ -57,40 +57,38 @@ 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 | ||
} | ||
echo "version=$newVersionString" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append | ||
- name: Setup MS Build | ||
uses: microsoft/[email protected] | ||
- 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)' | ||
generateReleaseNotes: true | ||
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 |