Skip to content

Commit

Permalink
different actions for github release
Browse files Browse the repository at this point in the history
  • Loading branch information
JaSei committed Oct 30, 2023
1 parent 8971795 commit b95d444
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/_service_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ jobs:
message: '"${{ steps.tag_image.outputs.next_tag }}: PR #${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}"'

- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag_image.outputs.next_tag }}
release_name: Release ${{ steps.tag_image.outputs.next_tag }}
generate_release_notes: true
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ new_version_file := /tmp/newtag.txt
new_tag:
@echo "Pulling current tags."
@git pull --ff-only --tags
@LATEST=`git describe --tags --always --abbrev=0 --match "$(SERVICE_NAME)/v*"`; \
@LATEST=`git describe --tags --always --abbrev=0 --match "$(SERVICE_NAME)/v*" | sed 's/$(SERVICE_NAME)\///'`; \
echo "Latest tag: $$LATEST"; \
NEWPRE="v$$(date +'%Y').$$(date +'%m')"; \
if [ "$$LATEST" = $$NEWPRE* ]; then \
new_version="$$LATEST$${LATEST%.*}.$$(( $${LATEST##*.} + 1 ))"; \
echo "New prefix: $$NEWPRE"; \
if case $$LATEST in $$NEWPRE*) ;; *) false;; esac ; then \
echo "Incrementing patch version."; \
new_version="$${LATEST%.*}.$$(( $${LATEST##*.} + 1 ))"; \
else \
new_version="$$NEWPRE.0"; \
fi; \
Expand Down

0 comments on commit b95d444

Please sign in to comment.