This commit is contained in:
@@ -34,6 +34,20 @@ jobs:
|
||||
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Extract version changelog
|
||||
id: changelog
|
||||
run: |
|
||||
# VERSION="${{ steps.tag.outputs.version }}"
|
||||
VERSION=$(cat VERSION | tr -d '[:space:]') # read version and trim whitespace
|
||||
CHANGELOG_FILE=$(python scripts/get_changelog.py $VERSION)
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "No changelog found for version $VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "changelog=$(cat $CHANGELOG_FILE)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build Artifacts
|
||||
if: steps.tag.outputs.version
|
||||
run: |
|
||||
@@ -46,6 +60,7 @@ jobs:
|
||||
id: create_release
|
||||
run: |
|
||||
VERSION="${{ steps.tag.outputs.version }}"
|
||||
CHANGELOG="${{ steps.changelog.outputs.changelog }}"
|
||||
RESPONSE=$(curl -s -X POST \
|
||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
@@ -53,7 +68,7 @@ jobs:
|
||||
-d '{
|
||||
"tag_name": "v'"$VERSION"'",
|
||||
"name": "wapp-v'"$VERSION"'",
|
||||
"body": "Automated release for wapp-v'"$VERSION"'",
|
||||
"body": "'"$CHANGELOG"'",
|
||||
"draft": false,
|
||||
"prerelease": false
|
||||
}')
|
||||
|
||||
Reference in New Issue
Block a user