@@ -16,30 +16,13 @@ jobs:
1616
1717 - name : Derive version from tag
1818 id : ver
19- run : |
20- VERSION="${GITHUB_REF_NAME#v}" # v1.0 -> 1.0
21- echo "version=$VERSION" >> "$GITHUB_OUTPUT"
19+ run : echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" # v1.0 -> 1.0
2220
23- - name : Stamp version into theme files
24- env :
25- VERSION : ${{ steps.ver.outputs.version }}
26- run : |
27- sed -i -E "s|<version>[^<]*</version>|<version>${VERSION}</version>|" theme_info.xml
28- sed -i -E "s|(@version[[:space:]]+).*|\1${VERSION}|" index.template.php
29- grep -n "<version>" theme_info.xml
30- grep -n "@version" index.template.php
31-
32- - name : Build theme zip (wrapped in siduction/)
33- env :
34- VERSION : ${{ steps.ver.outputs.version }}
21+ - name : Build theme zip
22+ id : build
3523 run : |
36- rm -rf dist && mkdir -p dist/siduction
37- rsync -a \
38- --exclude='.git' --exclude='.github' --exclude='.gitignore' \
39- --exclude='deploy.sh' --exclude='dist' --exclude='.DS_Store' \
40- ./ dist/siduction/
41- (cd dist && zip -r -q "siduction-${VERSION}.zip" siduction)
42- ls -lah dist
24+ chmod +x build.sh
25+ echo "zip=$(./build.sh "${{ steps.ver.outputs.version }}" | tail -n1)" >> "$GITHUB_OUTPUT"
4326
4427 - name : Create GitHub release
4528 env :
4932 PRERELEASE=""
5033 case "$VERSION" in *-*) PRERELEASE="--prerelease";; esac # v1.0-rc1 -> prerelease
5134 gh release create "$GITHUB_REF_NAME" \
52- "dist/siduction-${VERSION}. zip" \
35+ "${{ steps.build.outputs. zip }} " \
5336 --title "Siduction $VERSION" \
5437 --generate-notes $PRERELEASE
0 commit comments