Skip to content

Commit

Permalink
Merge pull request #1 from agence-tbd/main
Browse files Browse the repository at this point in the history
Fix sub folder in archive
  • Loading branch information
vpietri-tbd authored Nov 26, 2024
2 parents feb31fc + da1db64 commit 89792be
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ composer.json export-ignore
composer.lock export-ignore
webpack.config.js export-ignore
tasks export-ignore
payline export-ignore
node_modules export-ignore
.nvmrc export-ignore
.gitlab-ci.yml export-ignore
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ jobs:
- name: Build project
run: npm run build

- name: Zip fix
run: mv woocommerce-gateway-payline.zip woocommerce-payline_v${{ inputs.version_number }}.zip
- name: Unzip in Payline folder
run: rm -rf ./payline && mkdir release && unzip woocommerce-gateway-payline.zip -d ./payline

- name: Repackage
run: zip -r woocommerce-payline_v${{ inputs.version_number }}.zip ./payline

- uses: ncipollo/[email protected]
name: Create GitHub Release
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
node_modules
build
*.zip
release
release
payline
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ build_job:
image: node:20-buster
script:
- npm install
- npm run build
- npm run build:release
- npm run build:webpack
- npm run release:gitlab
- mv payline.zip $PAYLINE_ZIP_PACKAGE
artifacts:
paths:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"start:webpack": "wp-scripts start",
"build:webpack": "wp-scripts build",
"postbuild": "npm run -s && npm run archive",
"archive": "composer archive --file=$npm_package_name --format=zip"
"archive": "composer archive --file=$npm_package_name --format=zip",
"release:gitlab": "node tasks/release.js && mv release/*.zip ."
}
}

0 comments on commit 89792be

Please sign in to comment.