name: Build WP theme package & Release
on:
pull_request:
branches: [ master ]
types: [closed]
workflow_dispatch:
jobs:
build_release:
runs-on: ubuntu-latest
env:
PACKAGE_LABEL: One
PACKAGE_NAME: one
RELEASE_TAG: 2.4.3
steps:
- uses: actions/checkout@v2
- name: NPM build
run: |
sudo apt-get install nodejs
sudo apt-get install npm
npm install
npm run build
- name: Zip build
run: |
sudo apt-get install zip -y
mkdir build
zip -r build/${{ env.PACKAGE_NAME }}-${{ env.RELEASE_TAG }}.zip . -x "*build*" -x "*.git/**" -x "*.github/**" -x "*_content/**" -x "*_dev/**" -x "*.git*" -x "*.md" -x "composer.*" -x "*node_modules/**" -x "gulpfile.js" -x "package.json" -x "package-lock.json"
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
artifacts: "build/${{ env.PACKAGE_NAME }}-${{ env.RELEASE_TAG }}.zip"
tag: ${{ env.RELEASE_TAG }}
name: ${{ env.PACKAGE_LABEL }} - v${{ env.RELEASE_TAG }}
|