Skip to content

Commit

Permalink
attempt to fix grep compatibility, attempt artifact upload
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleBlanchette committed Dec 10, 2023
1 parent d40a284 commit 6c616b6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
run: ./build_cleanup.sh
shell: bash

- name: Final Cleanup
run: |
find . -name '.git*' -exec rm -rf {} + -depth
find . -type d -empty -delete
# - name: Final Cleanup
# run: |
# find . -name '.git*' -exec rm -rf {} + -depth
# find . -type d -empty -delete

- name: DEBUG - Current Directory
run: |
Expand All @@ -51,7 +51,9 @@ jobs:
echo "Workspace: ${{ github.workspace }}"
echo "Repository: ${{ github.repository }}"
echo "Basename: $( basename "${{ github.repository }}" )"
echo "PTC_PLUGIN_ZIP_FILE_BASENAME: $PTC_PLUGIN_ZIP_FILE_BASENAME"
echo "PTC_PLUGIN_ZIP_FILE: $PTC_PLUGIN_ZIP_FILE"
echo "env PTC_PLUGIN_ZIP_FILE: ${{ env.PTC_PLUGIN_ZIP_FILE }}"
# - name: Publish WordPress Plugin Release
# uses: 10up/action-wordpress-plugin-deploy@stable
Expand All @@ -61,3 +63,9 @@ jobs:
# env:
# SVN_USERNAME: ${{ secrets.WPORG_SVN_USERNAME }}
# SVN_PASSWORD: ${{ secrets.WPORG_SVN_PASSWORD }}

- name: Upload ZIP File
uses: actions/upload-artifact@v3
with:
name: ${{ env.PTC_PLUGIN_ZIP_FILE_BASENAME }}
path: ${{ env.PTC_PLUGIN_ZIP_FILE }}
5 changes: 3 additions & 2 deletions bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

PLUGIN_SLUG=$( basename `pwd` )

VERSION=$(grep -Eio 'Version:\s*\d+\.\d+\.\d+(\-rc\.\d+)?' "${PLUGIN_SLUG}.php" | grep -Eo '\d+\.\d+\.\d+(\-rc\.\d+)?')
VERSION=$(grep -Eio 'Version:\s*[0-9]+\.[0-9]+\.[0-9]+(\-rc\.[0-9]+)?' "${PLUGIN_SLUG}.php" | grep -Eio '[0-9]+\.[0-9]+\.[0-9]+(\-rc\.[0-9]+)?')

# Create the plugin package.

Expand All @@ -19,8 +19,9 @@ popd
# Maybe export variables for GitHub Action.

if [ -n "$GITHUB_ENV" ]; then
echo "PTC_PLUGIN_ZIP_FILE_BASENAME=$( basename "$PLUGIN_ZIP_FILE" )" >> "$GITHUB_ENV"
echo "PTC_PLUGIN_ZIP_FILE=${PLUGIN_ZIP_FILE}" >> "$GITHUB_ENV"
echo "Exported GitHub ENV variables: PTC_PLUGIN_ZIP_FILE"
echo "Exported GitHub ENV variables."
else
echo "Did not set \$GITHUB_ENV variables."
fi
Expand Down

0 comments on commit 6c616b6

Please sign in to comment.