fix build

This commit is contained in:
hanyixuanten
2026-07-25 23:48:19 +08:00
parent 811003bc5c
commit ac7cfdf9f8
+10 -2
View File
@@ -12,7 +12,7 @@ on:
workflow_dispatch:
permissions:
contents: read
contents: write
jobs:
test-and-package:
@@ -56,6 +56,8 @@ jobs:
zip -qr "../${archive_name}" "${plugin_slug}"
)
unzip -p "${archive_name}" "${plugin_slug}/wp-translate.php" | grep -q '^ \* Plugin Name: WP Translate$'
printf 'archive=%s\n' "${archive_name}" >> "$GITHUB_OUTPUT"
- name: Upload plugin archive
@@ -64,4 +66,10 @@ jobs:
name: wp-translate-plugin
path: ${{ steps.package.outputs.archive }}
if-no-files-found: error
retention-days: 30
retention-days: 30
- name: Publish plugin ZIP to GitHub Release
if: startsWith( github.ref, 'refs/tags/v' )
uses: softprops/action-gh-release@v2
with:
files: ${{ steps.package.outputs.archive }}