ci: Git describe requires tags in checkout #5
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
name: Release Drafter | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
update_release_draft: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
with: | |
fetch-tags: true | |
- name: Generate Git Describe version | |
id: git_describe_ver | |
run: | | |
export GIT_DESC=`git describe --tags --always --abbrev=8 --dirty=-wip` | |
export BUILD_TAG=${GIT_DESC} | |
export VERSION=${BUILD_TAG:1} | |
echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
echo "tag=${BUILD_TAG}" >> $GITHUB_OUTPUT | |
echo "name=IKForth ${VERSION}" >> $GITHUB_OUTPUT | |
echo "Version set to ${VERSION}" | |
- uses: release-drafter/release-drafter@v6 | |
with: | |
tag: ${{ steps.git_describe_ver.outputs.tag }} | |
name: ${{ steps.git_describe_ver.outputs.name }} | |
version: ${{ steps.git_describe_ver.outputs.version }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |