Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6756d19d93 | |||
| c5b55d09ce |
@@ -25,12 +25,18 @@ jobs:
|
|||||||
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
TAG="${{ github.ref_name }}"
|
TAG="${{ github.ref_name }}"
|
||||||
RESPONSE=$(curl -sf -X POST \
|
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
|
||||||
-H "Authorization: token ${NODE_AUTH_TOKEN}" \
|
-H "Authorization: token ${NODE_AUTH_TOKEN}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\",\"draft\":false,\"prerelease\":false}" \
|
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\",\"draft\":false,\"prerelease\":false}" \
|
||||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases")
|
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases")
|
||||||
echo "id=$(echo "$RESPONSE" | jq -r .id)" >> $GITHUB_OUTPUT
|
HTTP_CODE=$(echo "$RESPONSE" | tail -1)
|
||||||
|
BODY=$(echo "$RESPONSE" | head -n -1)
|
||||||
|
echo "HTTP $HTTP_CODE: $BODY"
|
||||||
|
if [ "$HTTP_CODE" -lt 200 ] || [ "$HTTP_CODE" -ge 300 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "id=$(echo "$BODY" | jq -r .id)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Upload binaries
|
- name: Upload binaries
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bugswatch-agent",
|
"name": "bugswatch-agent",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"release": "npm version patch && git push && git push --tags",
|
"release": "npm version patch && git push && git push --tags",
|
||||||
"release:minor": "npm version minor && git push && git push --tags",
|
"release:minor": "npm version minor && git push && git push --tags",
|
||||||
|
|||||||
Reference in New Issue
Block a user