@@ -45,7 +45,7 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "changelog=$(cat $CHANGELOG_FILE)" >> $GITHUB_OUTPUT
|
echo "changelog_file=$CHANGELOG_FILE" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build Artifacts
|
- name: Build Artifacts
|
||||||
if: steps.tag.outputs.version
|
if: steps.tag.outputs.version
|
||||||
@@ -59,18 +59,17 @@ jobs:
|
|||||||
id: create_release
|
id: create_release
|
||||||
run: |
|
run: |
|
||||||
VERSION="${{ steps.tag.outputs.version }}"
|
VERSION="${{ steps.tag.outputs.version }}"
|
||||||
CHANGELOG="${{ steps.changelog.outputs.changelog }}"
|
CHANGELOG_FILE="${{ steps.changelog.outputs.changelog_file }}"
|
||||||
RESPONSE=$(curl -s -X POST \
|
RESPONSE=$(jq -n \
|
||||||
|
--arg tag "v$VERSION" \
|
||||||
|
--arg name "wapp-v$VERSION" \
|
||||||
|
--rawfile body "$CHANGELOG_FILE" \
|
||||||
|
'{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: false}' \
|
||||||
|
| curl -s -X POST \
|
||||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
"https://git.thewizardapprentice.com/api/v1/repos/${{ gitea.repository }}/releases" \
|
--data-binary @- \
|
||||||
-d '{
|
"https://git.thewizardapprentice.com/api/v1/repos/${{ gitea.repository }}/releases")
|
||||||
"tag_name": "v'"$VERSION"'",
|
|
||||||
"name": "wapp-v'"$VERSION"'",
|
|
||||||
"body": "'"$CHANGELOG"'",
|
|
||||||
"draft": false,
|
|
||||||
"prerelease": false
|
|
||||||
}')
|
|
||||||
|
|
||||||
echo "$RESPONSE"
|
echo "$RESPONSE"
|
||||||
RELEASE_ID=$(echo $RESPONSE | jq -r '.id')
|
RELEASE_ID=$(echo $RESPONSE | jq -r '.id')
|
||||||
|
|||||||
Reference in New Issue
Block a user