Skip to content

Commit

Permalink
Merge branch 'release-0.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
mscottford committed Oct 31, 2022
2 parents db1bbea + 44aa4a1 commit fb1a3e2
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

0 comments on commit fb1a3e2

Please sign in to comment.