Compare commits
2
Commits
b21394c674
...
d4425103ea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4425103ea | ||
|
|
02e2ed82ef |
No files matched your search
@@ -140,14 +140,48 @@ jobs:
|
|||||||
echo "Release notes extracted"
|
echo "Release notes extracted"
|
||||||
|
|
||||||
- name: Create Gitea Release
|
- name: Create Gitea Release
|
||||||
uses: actions/gitea-release-action@v1
|
env:
|
||||||
with:
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
token: ${{ secrets.GITEA_TOKEN }}
|
run: |
|
||||||
tag_name: ${{ github.ref_name }}
|
VERSION=${{ steps.version.outputs.version }}
|
||||||
release_name: "Release ${{ steps.version.outputs.version }}"
|
TAG_NAME=${{ github.ref_name }}
|
||||||
body_path: release_notes.txt
|
PRERELEASE="false"
|
||||||
draft: false
|
if [[ "$TAG_NAME" == *-* ]]; then
|
||||||
prerelease: ${{ contains(github.ref_name, '-') }}
|
PRERELEASE="true"
|
||||||
files: |
|
fi
|
||||||
releases/wp-fedistream-${{ steps.version.outputs.version }}.zip
|
|
||||||
releases/wp-fedistream-${{ steps.version.outputs.version }}.zip.sha256
|
# Read release notes
|
||||||
|
BODY=$(cat release_notes.txt)
|
||||||
|
|
||||||
|
# Create release via Gitea API
|
||||||
|
RELEASE_RESPONSE=$(curl -s -X POST \
|
||||||
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"tag_name\": \"${TAG_NAME}\", \"name\": \"Release ${VERSION}\", \"body\": $(echo "$BODY" | jq -Rs .), \"draft\": false, \"prerelease\": ${PRERELEASE}}" \
|
||||||
|
"${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}/releases")
|
||||||
|
|
||||||
|
RELEASE_ID=$(echo "$RELEASE_RESPONSE" | jq -r '.id')
|
||||||
|
|
||||||
|
if [ "$RELEASE_ID" == "null" ] || [ -z "$RELEASE_ID" ]; then
|
||||||
|
echo "Failed to create release:"
|
||||||
|
echo "$RELEASE_RESPONSE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Created release ID: $RELEASE_ID"
|
||||||
|
|
||||||
|
# Upload attachments
|
||||||
|
for file in "releases/wp-fedistream-${VERSION}.zip" "releases/wp-fedistream-${VERSION}.zip.sha256"; do
|
||||||
|
if [ -f "$file" ]; then
|
||||||
|
FILENAME=$(basename "$file")
|
||||||
|
echo "Uploading $FILENAME..."
|
||||||
|
curl -s -X POST \
|
||||||
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
-H "Content-Type: application/octet-stream" \
|
||||||
|
--data-binary "@$file" \
|
||||||
|
"${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=${FILENAME}"
|
||||||
|
echo "Uploaded $FILENAME"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Release created successfully: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/releases/tag/${TAG_NAME}"
|
||||||
@@ -505,7 +505,7 @@ wp-fedistream/
|
|||||||
- Uses Symfony HTTP Client via the license client package
|
- Uses Symfony HTTP Client via the license client package
|
||||||
- License validation cached for 24 hours using WordPress transients
|
- License validation cached for 24 hours using WordPress transients
|
||||||
|
|
||||||
### 2026-01-29 - CI/CD Pipeline
|
### 2026-01-29 - CI/CD Pipeline v0.4.0
|
||||||
|
|
||||||
**Summary:** Added Gitea Actions workflow for automated release package creation.
|
**Summary:** Added Gitea Actions workflow for automated release package creation.
|
||||||
|
|
||||||
@@ -517,7 +517,7 @@ wp-fedistream/
|
|||||||
- Automatic translation compilation (.po to .mo)
|
- Automatic translation compilation (.po to .mo)
|
||||||
- Version verification (plugin version must match tag)
|
- Version verification (plugin version must match tag)
|
||||||
- Proper WordPress plugin zip structure
|
- Proper WordPress plugin zip structure
|
||||||
- SHA256 and MD5 checksum generation
|
- SHA256 checksum generation
|
||||||
- Package structure verification
|
- Package structure verification
|
||||||
- Changelog extraction for release notes
|
- Changelog extraction for release notes
|
||||||
- Automatic Gitea release creation with attachments
|
- Automatic Gitea release creation with attachments
|
||||||
@@ -530,6 +530,8 @@ wp-fedistream/
|
|||||||
**Files Modified:**
|
**Files Modified:**
|
||||||
|
|
||||||
- `CLAUDE.md` - Added CI/CD documentation and updated directory structure
|
- `CLAUDE.md` - Added CI/CD documentation and updated directory structure
|
||||||
|
- `CHANGELOG.md` - Added v0.4.0 entry
|
||||||
|
- `wp-fedistream.php` - Version bump to 0.4.0
|
||||||
|
|
||||||
**Notes:**
|
**Notes:**
|
||||||
|
|
||||||
@@ -537,3 +539,4 @@ wp-fedistream/
|
|||||||
- Uses `shivammathur/setup-php@v2` for PHP setup
|
- Uses `shivammathur/setup-php@v2` for PHP setup
|
||||||
- Uses `actions/gitea-release-action@v1` for release creation
|
- Uses `actions/gitea-release-action@v1` for release creation
|
||||||
- Compatible with GitHub Actions syntax
|
- Compatible with GitHub Actions syntax
|
||||||
|
- User simplified checksums to SHA256 only (removed MD5)
|
||||||
Reference in new issue
Block a user