Compare commits
10
Commits
b21394c674
..
v0.4.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20c879c065 | ||
|
|
d104b0ae46 | ||
|
|
98ddb63d44 | ||
|
|
3dd2f4d126 | ||
|
|
dfa405c89b | ||
|
|
a7dbb7b4c5 | ||
|
|
efd3f7a170 | ||
|
|
077093765e | ||
|
|
d4425103ea | ||
|
|
02e2ed82ef |
No files matched your search
@@ -11,6 +11,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
@@ -34,6 +36,9 @@ jobs:
|
|||||||
composer config platform.php 8.3.0
|
composer config platform.php 8.3.0
|
||||||
composer install --no-dev --optimize-autoloader --no-interaction
|
composer install --no-dev --optimize-autoloader --no-interaction
|
||||||
|
|
||||||
|
- name: Install gettext
|
||||||
|
run: apt-get update && apt-get install -y gettext
|
||||||
|
|
||||||
- name: Compile translations
|
- name: Compile translations
|
||||||
run: |
|
run: |
|
||||||
for po in languages/*.po; do
|
for po in languages/*.po; do
|
||||||
@@ -106,9 +111,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Verify package structure
|
- name: Verify package structure
|
||||||
run: |
|
run: |
|
||||||
|
set +o pipefail
|
||||||
VERSION=${{ steps.version.outputs.version }}
|
VERSION=${{ steps.version.outputs.version }}
|
||||||
echo "Package contents:"
|
echo "Package contents:"
|
||||||
unzip -l "releases/wp-fedistream-${VERSION}.zip" | head -50
|
unzip -l "releases/wp-fedistream-${VERSION}.zip" | head -50 || true
|
||||||
|
|
||||||
# Verify main file is at correct location
|
# Verify main file is at correct location
|
||||||
if unzip -l "releases/wp-fedistream-${VERSION}.zip" | grep -q "wp-fedistream/wp-fedistream.php"; then
|
if unzip -l "releases/wp-fedistream-${VERSION}.zip" | grep -q "wp-fedistream/wp-fedistream.php"; then
|
||||||
@@ -140,14 +146,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.SRC_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}"
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "lib/wc-licensed-product-client"]
|
||||||
|
path = lib/wc-licensed-product-client
|
||||||
|
url = ../wc-licensed-product-client.git
|
||||||
@@ -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)
|
||||||
+3
-3
@@ -16,13 +16,13 @@
|
|||||||
},
|
},
|
||||||
"repositories": [
|
"repositories": [
|
||||||
{
|
{
|
||||||
"type": "vcs",
|
"type": "path",
|
||||||
"url": "https://src.bundespruefstelle.ch/magdev/wc-licensed-product-client.git"
|
"url": "lib/wc-licensed-product-client"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.3",
|
"php": ">=8.3",
|
||||||
"magdev/wc-licensed-product-client": "^0.1",
|
"magdev/wc-licensed-product-client": "^0.2",
|
||||||
"twig/twig": "^3.0"
|
"twig/twig": "^3.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
|||||||
Generated
+9
-7
@@ -4,15 +4,15 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "29e8e4e069b25dee0a610019a77dab50",
|
"content-hash": "0c8153ac31232ffe7f0af117cec865b4",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "magdev/wc-licensed-product-client",
|
"name": "magdev/wc-licensed-product-client",
|
||||||
"version": "v0.1.0",
|
"version": "v0.2.2",
|
||||||
"source": {
|
"dist": {
|
||||||
"type": "git",
|
"type": "path",
|
||||||
"url": "https://src.bundespruefstelle.ch/magdev/wc-licensed-product-client.git",
|
"url": "lib/wc-licensed-product-client",
|
||||||
"reference": "83037ea0c2d9e365cf9ec0ad50251d3ebc7e4782"
|
"reference": "f9281ec5fb23bf1993ab0240e0347c835009a10f"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.3",
|
"php": "^8.3",
|
||||||
@@ -51,7 +51,9 @@
|
|||||||
"issues": "https://src.bundespruefstelle.ch/magdev/wc-licensed-product-client/issues",
|
"issues": "https://src.bundespruefstelle.ch/magdev/wc-licensed-product-client/issues",
|
||||||
"source": "https://src.bundespruefstelle.ch/magdev/wc-licensed-product-client"
|
"source": "https://src.bundespruefstelle.ch/magdev/wc-licensed-product-client"
|
||||||
},
|
},
|
||||||
"time": "2026-01-22T15:24:57+00:00"
|
"transport-options": {
|
||||||
|
"relative": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/cache",
|
"name": "psr/cache",
|
||||||
|
|||||||
Submodule
+1
Submodule lib/wc-licensed-product-client added at 56abe8a97c.
Reference in new issue
Block a user