Skip to content

Commit

Permalink
Merge branch '34420_github_action' into 'main'
Browse files Browse the repository at this point in the history
34420_automtic_build

See merge request paylinebymonext/payline-woocommerce!40
  • Loading branch information
vpietri-tbd committed Dec 2, 2024
2 parents da1db64 + 4aebc66 commit 13f3a3d
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build package
on:
release:
types: [published]

jobs:
build:
name: Build and Release
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4

- name: Setup node version
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Install dependencies
run: npm install

- name: Build project
run: npm run build

- 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${{ github.ref_name }}.zip ./payline

- name: Upload asset using gh CLI
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ZIP_PATH: woocommerce-payline_v${{ github.ref_name }}.zip
run: gh release upload ${{ github.event.release.tag_name }} $ZIP_PATH

0 comments on commit 13f3a3d

Please sign in to comment.