Skip to content

Commit

Permalink
fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kilbot committed Nov 11, 2023
1 parent 77e6744 commit 272f003
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ composer.json
composer.lock
hookdoc-conf.json
package.json
yarn.lock
yarn.lock
16 changes: 5 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,18 @@ jobs:
composer install --no-dev
yarn build:js
- name: Read .distignore
- name: Sync to Temporary Directory
if: steps.check_version.outputs.release == 'true'
run: |
EXCLUDES=$(awk '{print "-x \42"$0"\42"}' .distignore | xargs)
echo "EXCLUDES=$EXCLUDES" >> $GITHUB_ENV
- name: Debug EXCLUDES
if: steps.check_version.outputs.release == 'true'
run: |
echo "Exclude string: $EXCLUDES"
mkdir temp_dir
rsync -av --exclude-from='.distignore' ./ temp_dir/
- name: Compress and Upload ZIP
if: steps.check_version.outputs.release == 'true'
run: |
set -x
zip -r woocommerce-pos.zip . $EXCLUDES
set +x
zip -r woocommerce-pos.zip temp_dir
gh release upload v${{ env.VERSION }} woocommerce-pos.zip --clobber
rm -rf temp_dir
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 272f003

Please sign in to comment.