internal: Update go pro image #77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
workflow_dispatch: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- 'main' | |
- '3.*' | |
# This allows a subsequently queued workflow run to interrupt previous runs | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
run: | |
runs-on: ubuntu-22.04 | |
if: startsWith( github.repository, 'elementor/' ) | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Install Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-npm-${{ hashFiles('**/package-lock.json') }} | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build and Deploy | |
run: | | |
npm config set git-tag-version false | |
export PLUGIN_VERSION=$(date '+%Y%m%d.%H%M') | |
export PACKAGE_VERSION=$(cat package.json \ | |
| grep version \ | |
| head -1 \ | |
| awk -F: '{ print $2 }' \ | |
| sed 's/[",]//g' \ | |
| tr -d '[[:space:]]') | |
export PLUGIN_FOLDER_FILENAME="elementor-${PACKAGE_VERSION}-${PLUGIN_VERSION}" | |
export PLUGIN_ZIP_FILENAME="${PLUGIN_FOLDER_FILENAME}.zip" | |
grunt build | |
sed -i -E "s/Version: (.*?)/Version: ${PACKAGE_VERSION}-${PLUGIN_VERSION}/g" build/elementor.php | |
sed -i -E "s/ELEMENTOR_VERSION', '(.*?)'/ELEMENTOR_VERSION', '${PACKAGE_VERSION}-${PLUGIN_VERSION}'/g" build/elementor.php | |
mv build elementor | |
zip -r $PLUGIN_ZIP_FILENAME elementor | |
echo "PLUGIN_FOLDER_FILENAME=${PLUGIN_FOLDER_FILENAME}" >> $GITHUB_ENV | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.PLUGIN_FOLDER_FILENAME }} | |
path: elementor |