Skip to content

Commit

Permalink
Fix multiple re-renders of metrics page / update release worker - Upd…
Browse files Browse the repository at this point in the history
…ate docker build workflow
  • Loading branch information
caioricciuti committed May 18, 2024
1 parent 1a55269 commit 1e13d7b
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
set -e # Fail on first error
# Extract the latest tag, or default to v1.0.0 if no tags exist
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
latest_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo "v1.0.0")
echo "Latest tag: $latest_tag"
echo "latest_tag=$latest_tag" >> $GITHUB_ENV
Expand All @@ -39,38 +39,9 @@ jobs:
echo "New tag: $new_tag"
echo "new_tag=$new_tag" >> $GITHUB_ENV
- name: Check if tag exists
id: tag_check
run: |
set -e # Fail on first error
if git rev-parse "refs/tags/${{ env.new_tag }}" >/dev/null 2>&1; then
echo "Tag already exists."
# Increment the minor version instead
new_minor=$((minor + 1))
new_patch=0
new_tag="v$major.$new_minor.$new_patch"
echo "New incremented tag: $new_tag"
echo "new_tag=$new_tag" >> $GITHUB_ENV
else
echo "Tag does not exist."
echo "new_tag=$new_tag" >> $GITHUB_ENV
- name: Create new tag
run: |
set -e # Fail on first error
git tag ${{ env.new_tag }}
git push origin ${{ env.new_tag }}
- name: Create GitHub release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }}
with:
tag_name: ${{ env.new_tag }}
release_name: ${{ env.new_tag }}
body: "Automated release for tag ${{ env.new_tag }}"
draft: false
prerelease: false

0 comments on commit 1e13d7b

Please sign in to comment.