mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Add GH Action for building package
This commit is contained in:
parent
061ca9e7fd
commit
706ff246da
2 changed files with 44 additions and 0 deletions
|
@ -14,3 +14,6 @@ trim_trailing_whitespace = false
|
|||
|
||||
[*.{js,json,yml}]
|
||||
indent_style = space
|
||||
|
||||
[*.yml]
|
||||
indent_size = 2
|
||||
|
|
41
.github/workflows/package.yml
vendored
Normal file
41
.github/workflows/package.yml
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
name: Build package
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
packageVersion:
|
||||
description: 'Package Version'
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
package:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
name: Build package
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 7.1
|
||||
tools: composer:v1
|
||||
|
||||
- name: Set plugin version header
|
||||
env:
|
||||
PACKAGE_VERSION: ${{ github.event.inputs.packageVersion }}
|
||||
run: 'sed -Ei "s/Version: .*/Version: ${PACKAGE_VERSION}/g" woocommerce-paypal-payments.php'
|
||||
if: github.event.inputs.packageVersion
|
||||
|
||||
- name: Build
|
||||
run: yarn build
|
||||
|
||||
- name: Unzip # GH currently always zips, so if we upload a zip we get a zip inside a zip
|
||||
run: unzip woocommerce-paypal-payments.zip -d dist
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: woocommerce-paypal-payments
|
||||
path: dist/
|
Loading…
Add table
Add a link
Reference in a new issue