Add more stuff
This commit is contained in:
@@ -64,11 +64,19 @@ jobs:
|
|||||||
API_URL="${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases"
|
API_URL="${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases"
|
||||||
TOKEN="${{ secrets.GITHUB_TOKEN }}"
|
TOKEN="${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
|
||||||
echo "Creating Release for tag $TAG..."
|
IS_PRERELEASE="false"
|
||||||
|
case "$TAG" in
|
||||||
|
*beta*|*alpha*|*rc*|*pre*|*preview*|*dev*)
|
||||||
|
IS_PRERELEASE="true"
|
||||||
|
echo "Tag $TAG detected as pre-release / beta."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "Creating Release for tag $TAG (prerelease=$IS_PRERELEASE)..."
|
||||||
RESPONSE=$(curl -s -X POST "$API_URL" \
|
RESPONSE=$(curl -s -X POST "$API_URL" \
|
||||||
-H "Authorization: token $TOKEN" \
|
-H "Authorization: token $TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{\"tag_name\": \"$TAG\", \"name\": \"j3270 $TAG\", \"body\": \"Automated release for $TAG.\n\n### Running j3270\n```bash\njava -jar j3270.jar\n```\", \"draft\": false, \"prerelease\": false}")
|
-d "{\"tag_name\": \"$TAG\", \"name\": \"j3270 $TAG\", \"body\": \"Automated release for **$TAG**.\n\n### Running j3270\n```bash\njava -jar j3270.jar\n```\", \"draft\": false, \"prerelease\": $IS_PRERELEASE}")
|
||||||
|
|
||||||
RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | head -n 1 | cut -d':' -f2)
|
RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | head -n 1 | cut -d':' -f2)
|
||||||
|
|
||||||
|
|||||||
@@ -64,11 +64,19 @@ jobs:
|
|||||||
API_URL="${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases"
|
API_URL="${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases"
|
||||||
TOKEN="${{ secrets.GITHUB_TOKEN }}"
|
TOKEN="${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
|
||||||
echo "Creating Release for tag $TAG..."
|
IS_PRERELEASE="false"
|
||||||
|
case "$TAG" in
|
||||||
|
*beta*|*alpha*|*rc*|*pre*|*preview*|*dev*)
|
||||||
|
IS_PRERELEASE="true"
|
||||||
|
echo "Tag $TAG detected as pre-release / beta."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "Creating Release for tag $TAG (prerelease=$IS_PRERELEASE)..."
|
||||||
RESPONSE=$(curl -s -X POST "$API_URL" \
|
RESPONSE=$(curl -s -X POST "$API_URL" \
|
||||||
-H "Authorization: token $TOKEN" \
|
-H "Authorization: token $TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{\"tag_name\": \"$TAG\", \"name\": \"j3270 $TAG\", \"body\": \"Automated release for $TAG.\n\n### Running j3270\n```bash\njava -jar j3270.jar\n```\", \"draft\": false, \"prerelease\": false}")
|
-d "{\"tag_name\": \"$TAG\", \"name\": \"j3270 $TAG\", \"body\": \"Automated release for **$TAG**.\n\n### Running j3270\n```bash\njava -jar j3270.jar\n```\", \"draft\": false, \"prerelease\": $IS_PRERELEASE}")
|
||||||
|
|
||||||
RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | head -n 1 | cut -d':' -f2)
|
RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | head -n 1 | cut -d':' -f2)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user