Skip to content

Commit

Permalink
DEV: Add action for automatic releases
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinThoma committed Aug 6, 2023
1 parent 7d0bc54 commit 470ecab
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,18 @@ jobs:
id: prepare_variables
run: |
git fetch --tags --force
latest_tag=$(git describe --tags --abbrev=0)
echo "latest_tag=$(git describe --tags --abbrev=0)" >> "$GITHUB_ENV"
echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_ENV"
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "tag_body<<$EOF" >> "$GITHUB_ENV"
git tag -l "${GITHUB_REF_NAME}" --format='%(contents:body)' >> "$GITHUB_ENV"
git --no-pager tag -l "${latest_tag}" --format='%(contents:body)' >> "$GITHUB_ENV"
echo "$EOF" >> "$GITHUB_ENV"
- name: Create GitHub Release 🚀
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
name: Version ${{ env.GITHUB_REF_NAME }}, ${{ env.date }}
tag_name: ${{ env.latest_tag }}
name: Version ${{ env.latest_tag }}, ${{ env.date }}
draft: false
prerelease: false
body: Body is ${{ env.tag_body }}
body: ${{ env.tag_body }}

0 comments on commit 470ecab

Please sign in to comment.