Skip to content

Commit

Permalink
Get Tag Info
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Kibysh committed Sep 13, 2023
1 parent 0be5ee2 commit 71906d1
Showing 1 changed file with 18 additions and 28 deletions.
46 changes: 18 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,24 @@ jobs:
tag_name: ${{ steps.get_tag_name.outputs.tag_name }} }}
tag_message: ${{ steps.get_tag_message.outputs.tag_message }}
steps:
- name: Add Git Identity
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get tag message
id: get_tag_message
run: |
TAG_MESSAGE=$(git for-each-ref refs/tags/0.1.3 --format '%(contents)')
echo "TAG_MESSAGE=$TAG_MESSAGE" >> $GITHUB_ENV
- name: Print tag message
run: |
echo "Tag Message: $TAG_MESSAGE"
- name: Get last tag name
id: get_tag_name
run: echo "tag_name=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
# - name: Get last tag message
# id: get_tag_message
# run: |
# echo "tag_message=$(git tag -l ${{ steps.get_tag_name.outputs.tag_name }} --format='%(contents)')" >> $GITHUB_OUTPUT
- name: Print Outputs
run: |
echo "Tag Name: ${{ steps.get_tag_name.outputs.tag_name }}"
echo "Tag Message: ${{ steps.get_tag_message.outputs.tag_message }}"
echo "tag_message=$(git tag -l 0.1.3 --format='%(contents)')"
- name: Checkout code
uses: actions/checkout@v4
- name: Get Tag Name
id: get_tag_name
run: |
echo "tag_name=${{ github.ref_name }}" >> $GITHUB_OUTPUT
echo "Tag Name: ${{ github.ref_name }}"
- name: Get Tag Message
id: get_tag_message
run: |
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
tm=$(git tag -l --format='%(contents:subject)' ${{ steps.get_tag_name.outputs.tag_name }})
echo "Tag Message: $tm"
echo "tag_message=$tm" >> $GITHUB_OUTPUT
- name: Print Output
run: |
echo "Tag Name: ${{ steps.get_tag_name.outputs.tag_name }}"
echo "Tag Message: ${{ steps.get_tag_message.outputs.tag_message }}"
# run_copy_script:
# runs-on: macos-latest
Expand Down

0 comments on commit 71906d1

Please sign in to comment.