Compare commits

..
2 Commits
Author SHA1 Message Date
dtourolle 6ed53054c3 remove changelog
🏗️ Build Plugin / build (push) Successful in 2m18s
🧪 Test Plugin / test (push) Successful in 1m10s
🚀 Release Plugin / build-and-release (push) Successful in 2m16s
2025-11-14 21:39:34 +01:00
dtourolle 1a8b7a33ef more dman ci stuff
🏗️ Build Plugin / build (push) Successful in 2m22s
🧪 Test Plugin / test (push) Successful in 1m8s
🚀 Release Plugin / build-and-release (push) Failing after 2m18s
2025-11-14 21:29:51 +01:00
+51 -25
View File
@@ -70,33 +70,59 @@ jobs:
echo "artifact_name=${ARTIFACT_NAME}" >> $GITHUB_OUTPUT echo "artifact_name=${ARTIFACT_NAME}" >> $GITHUB_OUTPUT
echo "Found artifact: ${ARTIFACT}" echo "Found artifact: ${ARTIFACT}"
- name: Generate changelog - name: Create Release
id: changelog env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
# Get commits since last tag # Get repository information
PREV_TAG=$(git tag --sort=-creatordate | grep -v "${{ steps.get_version.outputs.version }}" | head -n 1) REPO_OWNER="${{ github.repository_owner }}"
if [ -z "$PREV_TAG" ]; then REPO_NAME="${{ github.event.repository.name }}"
CHANGELOG=$(git log --pretty=format:"- %s (%h)" --no-merges) GITEA_URL="${{ github.server_url }}"
# Prepare release body
RELEASE_BODY="SRFPlay Jellyfin Plugin ${{ steps.get_version.outputs.version }}\n\nSee attached files for plugin installation."
RELEASE_BODY_JSON=$(echo -n "${RELEASE_BODY}" | jq -Rs .)
# Create release using Gitea API
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
"${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases" \
-d "{
\"tag_name\": \"${{ steps.get_version.outputs.version }}\",
\"name\": \"Release ${{ steps.get_version.outputs.version }}\",
\"body\": ${RELEASE_BODY_JSON},
\"draft\": false,
\"prerelease\": false
}")
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 300 ]; then
RELEASE_ID=$(echo "$BODY" | jq -r '.id')
echo "Created release with ID: ${RELEASE_ID}"
else else
CHANGELOG=$(git log ${PREV_TAG}..${{ steps.get_version.outputs.version }} --pretty=format:"- %s (%h)" --no-merges) echo "Failed to create release. HTTP ${HTTP_CODE}"
echo "$BODY"
exit 1
fi fi
# Save to file for release notes # Upload plugin artifact
echo "## What's Changed" > RELEASE_NOTES.md echo "Uploading plugin artifact..."
echo "" >> RELEASE_NOTES.md curl -f -X POST \
echo "${CHANGELOG}" >> RELEASE_NOTES.md -H "Authorization: token ${GITEA_TOKEN}" \
echo "" >> RELEASE_NOTES.md -H "Content-Type: application/zip" \
echo "**Full Changelog**: ${PREV_TAG}...${{ steps.get_version.outputs.version }}" >> RELEASE_NOTES.md --data-binary "@${{ steps.jprm.outputs.artifact }}" \
"${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases/${RELEASE_ID}/assets?name=${{ steps.jprm.outputs.artifact_name }}"
- name: Create Release # Upload build.yaml
uses: actions/gitea-release-action@v1 echo "Uploading build.yaml..."
with: curl -f -X POST \
token: ${{ secrets.GITHUB_TOKEN }} -H "Authorization: token ${GITEA_TOKEN}" \
tag_name: ${{ steps.get_version.outputs.version }} -H "Content-Type: application/x-yaml" \
name: Release ${{ steps.get_version.outputs.version }} --data-binary "@build.yaml" \
body_path: RELEASE_NOTES.md "${GITEA_URL}/api/v1/repos/${REPO_OWNER}/${REPO_NAME}/releases/${RELEASE_ID}/assets?name=build.yaml"
draft: false
prerelease: false echo "✅ Release created successfully!"
files: | echo "View at: ${GITEA_URL}/${REPO_OWNER}/${REPO_NAME}/releases/tag/${{ steps.get_version.outputs.version }}"
${{ steps.jprm.outputs.artifact }}
build.yaml