diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ce6f8d3..6e59755 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,6 +20,6 @@ jobs: - name: Release run: | - ./scripts/release.sh $BOT_GITHUB_TOKEN + ./scripts/release.sh unconditionalday source $BOT_GITHUB_TOKEN env: BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} diff --git a/scripts/release.sh b/scripts/release.sh index e1bdc9b..9118ac3 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -5,10 +5,9 @@ calver=$(date +%Y-%m-%d) git tag -a "$calver" -m "Version $calver" git push origin "$calver" -OWNER="unconditionalday" -REPO="source-test" - -TOKEN=$1 +OWNER=$1 +REPO=$2 +TOKEN=$3 response=$(curl -X POST "https://api.github.com/repos/$OWNER/$REPO/releases" \ -H "Authorization: token $TOKEN" \ @@ -21,9 +20,9 @@ response=$(curl -X POST "https://api.github.com/repos/$OWNER/$REPO/releases" \ release_id=$(echo "$response" | jq -r '.id') if [ "$release_id" != "null" ]; then - echo "Release $calver creata con successo su GitHub (ID: $release_id)" + echo "Release $calver created successfully on GitHub (ID: $release_id)" else - echo "Errore nella creazione della release su GitHub." + echo "Error creating the release on GitHub." echo "$response" exit 1 fi @@ -36,4 +35,4 @@ curl -X POST -H "Authorization: token $TOKEN" -H "Content-Type: application/json --data-binary @"$FILE_PATH" \ "$upload_url?name=source.json" -echo "Allegato aggiunto con successo alla release." +echo "Attachment added successfully to the release."