Skip to content

Commit de7683b

Browse files
authored
Release update (#626)
* Update Github Release Info * Actions release * Update
1 parent 2d2dd48 commit de7683b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/build-linux.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ jobs:
5353
echo "RELEASE=bleeding" >> $GITHUB_ENV
5454
echo "PRERELEASE=true" >> $GITHUB_ENV
5555
fi
56+
TAG_NAME=${GITHUB_REF#refs/tags/}
57+
echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV
5658
5759
- name: Install
5860
run: ./scripts/linux/ci_install_core.sh
@@ -166,3 +168,31 @@ jobs:
166168
token: ${{ secrets.GITHUB_TOKEN }}
167169
tag_name: ${{ env.RELEASE }}
168170
files: projectGenerator-linux-armv7l-gui.gz
171+
172+
- name: Get Release ID for the Tag
173+
id: get_release
174+
if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
175+
run: |
176+
RELEASE_ID=$(curl -s \
177+
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
178+
-H "Accept: application/vnd.github.v3+json" \
179+
https://api.github.com/repos/openframeworks/projectGenerator/releases | jq -r '.[] | select(.tag_name=="${{ env.TAG_NAME }}") | .id')
180+
181+
if [ -z "$RELEASE_ID" ]; then
182+
echo "Release ID not found for tag: ${{ env.TAG_NAME }}"
183+
exit 1
184+
fi
185+
186+
echo "RELEASE_ID=${RELEASE_ID}" >> $GITHUB_ENV
187+
echo "Found Release ID: ${RELEASE_ID}"
188+
189+
- name: Update Release Description
190+
if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
191+
run: |
192+
curl -X PATCH \
193+
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
194+
-H "Accept: application/vnd.github.v3+json" \
195+
https://api.github.com/repos/openframeworks/projectGenerator/releases/${{ env.RELEASE_ID }} \
196+
-d '{
197+
"body": "Updated release for tag: ${{ env.TAG_NAME }} - '"$(date '+%Y-%m-%d %H:%M:%S')"'"
198+
}'

0 commit comments

Comments
 (0)