-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
0 additions
and
44 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 |
---|---|---|
|
@@ -30,12 +30,6 @@ jobs: | |
with: | ||
versionSpec: '5.10.3' | ||
|
||
- name: "[Setup] - Install GitReleaseManager" | ||
if: ${{ github.event_name == 'push' }} | ||
uses: gittools/actions/gitreleasemanager/[email protected] | ||
with: | ||
versionSpec: '0.13.0' | ||
|
||
- name: "[Setup] - Install Ruby" | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
|
@@ -69,33 +63,6 @@ jobs: | |
- name: "[Versioning] - Display updated csproj File" | ||
run: cat Corgibytes.Freshli.Cli/Corgibytes.Freshli.Cli.csproj | ||
|
||
# If there are no closed issues generating the Github Release will fail because it raises an exception. | ||
# Work around this by checking for success or no closed issue errors. | ||
- name: "[Draft Release] - Create/Update GitHub Release ${{ steps.gitversion.outputs.majorMinorPatch }}" | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
dotnet-gitreleasemanager create --owner corgibytes --repository freshli-cli --token ${{ secrets.GITHUB_TOKEN }} --milestone v${{ steps.gitversion.outputs.majorMinorPatch }} --logFilePath output.txt || true | ||
cat output.txt | grep 'No closed issues have been found for milestone\|Drafted release is available at' | ||
# This will generate the change log for all the GitHub Releases, feature | ||
# is not included in the GitReleaseManager action yet. | ||
# The sed line finds the current release and replaces the line with a new link to the Docker image. | ||
# Note that it uses ! as the delimiter. | ||
- name: "[Draft Release] - Generate Change Log" | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
dotnet-gitreleasemanager export --token ${{ secrets.GITHUB_TOKEN }} -o 'corgibytes' -r 'freshli-cli' -f 'CHANGELOG.md' | ||
sed -i -e '\!## v${{ steps.gitversion.outputs.majorMinorPatch }}!{n;s!.*!Associated Docker image: [corgibytes/freshli-cli:${{ steps.gitversion.outputs.semVer }}-${{ steps.gitversion.outputs.fullBuildMetadata }}](https://hub.docker.com/r/corgibytes/freshli-cli/tags?page=1&name=${{ steps.gitversion.outputs.fullSemVer }}-${{ steps.gitversion.outputs.fullBuildMetadata }})!}' CHANGELOG.md | ||
git add --renormalize CHANGELOG.md | ||
cat CHANGELOG.md | ||
- name: "[Draft Release] - Commit Change Log and if it Changed" | ||
if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }} | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Committing auto generated change log. | ||
file_pattern: CHANGELOG.md | ||
|
||
- name: "[Build] - Build" | ||
run: dotnet build --configuration Release | ||
|
||
|
@@ -224,14 +191,3 @@ jobs: | |
with: | ||
name: freshli-cli-${{ steps.gitversion.outputs.majorMinorPatch }}-alpha-osx-x64.zip | ||
path: ${{ env.BUILD_ARTIFACTS_FOLDER }}/freshli-cli-${{ steps.gitversion.outputs.majorMinorPatch }}-osx-x64.zip | ||
|
||
- name: "[Post Publish] - Add Assets to Release Draft" | ||
if: github.event_name == 'push' | ||
run: | | ||
dotnet-gitreleasemanager addasset \ | ||
--owner corgibytes \ | ||
--repository freshli-cli \ | ||
--token ${{ secrets.GITHUB_TOKEN }} \ | ||
--targetDirectory /home/runner/work/freshli-cli/freshli-cli \ | ||
--tagName 'v${{ steps.gitversion.outputs.majorMinorPatch }}' \ | ||
--assets ${{ env.BUILD_ARTIFACTS_FOLDER }}/freshli-cli-${{ steps.gitversion.outputs.majorMinorPatch }}-win-x64.zip,${{ env.BUILD_ARTIFACTS_FOLDER }}/freshli-cli-${{ steps.gitversion.outputs.majorMinorPatch }}-linux-x64.zip,${{ env.BUILD_ARTIFACTS_FOLDER }}/freshli-cli-${{ steps.gitversion.outputs.majorMinorPatch }}-osx-x64.zip |