Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b2721c2ec3 |
@@ -57,22 +57,20 @@ jobs:
|
||||
|
||||
API_BASE="${GITEA_SERVER}/api/v1"
|
||||
|
||||
REMOTE_URL=$(git config --get remote.origin.url)
|
||||
echo "Remote URL: $REMOTE_URL"
|
||||
|
||||
REPO_FULL=$(echo "$REMOTE_URL" \
|
||||
| sed -E 's#https?://[^/]+/##' \
|
||||
| sed 's/\.git$//')
|
||||
|
||||
OWNER=$(echo "$REPO_FULL" | cut -d/ -f1)
|
||||
REPO_NAME=$(echo "$REPO_FULL" | cut -d/ -f2)
|
||||
# Gitea Actions są kompatybilne z GITHUB_ envs
|
||||
OWNER="${{ github.repository_owner }}"
|
||||
REPO_NAME=$(echo "${{ github.repository }}" | cut -d/ -f2)
|
||||
TAG="${{ github.ref_name }}"
|
||||
|
||||
echo "URL: $API_BASE/repos/$OWNER/$REPO_NAME/releases"
|
||||
echo "OWNER=$OWNER"
|
||||
echo "REPO_NAME=$REPO_NAME"
|
||||
echo "TAG=$TAG"
|
||||
|
||||
TAG="${GITEA_REF_NAME}"
|
||||
|
||||
echo "Creating release $TAG for $OWNER/$REPO_NAME"
|
||||
if [ -z "$TAG" ]; then
|
||||
echo "Error: TAG (ref_name) is empty. Ensure you pushed a tag."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CREATE_RESPONSE=$(curl -s \
|
||||
-H "Content-Type: application/json" \
|
||||
|
||||
Reference in New Issue
Block a user