fix(posts): use uniqueId as stkQueryId to ensure uniqueness even when… #2037
Workflow file for this run
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: Plugin Build | |
on: | |
push: | |
branches: [ master, develop ] | |
pull_request: | |
branches: [ master, develop, feat/performance-2 ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v2 | |
- name: Set the version suffix for the output | |
run: echo VERSION_SUFFIX=${GITHUB_REF_NAME//\//-} >> $GITHUB_ENV | |
- name: Build Stackable Free Plugin | |
run: | | |
npm ci --legacy-peer-deps | |
npm run build:no-translate | |
- name: Append PR in build version & create PR build folder | |
run: | | |
node ./tools/append-build-version.js $VERSION_SUFFIX | |
cp -r build/stackable stackable-$VERSION_SUFFIX | |
# Keep this for now. Our plan is to simplify all tests into this one | |
# workflow, this is needed so we can reuse the build folder across sub jobs. | |
# - name: Create plugin zip file artifact uses: actions/upload-artifact@v3 | |
# with: name: stackable-${{ env.VERSION_SUFFIX }} path: build/stackable-* | |
# retention-days: 1 | |
- name: Zip PR build | |
uses: montudor/action-zip@v1 | |
with: | |
args: zip -qq -r stackable-${{ env.VERSION_SUFFIX }}.zip stackable-${{ env.VERSION_SUFFIX }} | |
- name: Upload PR build zip artifact | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: gavv/[email protected] | |
with: | |
commit: ${{ github.event.pull_request.head.sha }} | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: stackable-${{ env.VERSION_SUFFIX }}.zip | |
artifacts-branch: artifacts | |
- name: Comment WordPress playground link | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: dannyskoog/[email protected] | |
with: | |
message: 'Try this Pull Request in the WordPress playground: https://playground.wordpress.net/?mode=seamless#{"landingPage":"/wp-admin/post-new.php?post_type=page","preferredVersions":{"php":"latest","wp":"latest"},"steps":[{"step":"login","username":"admin","password":"password"},{"step":"installPlugin","pluginZipFile":{"resource":"url","url":"https://raw.githubusercontent.com/gambitph/Stackable/artifacts/pr${{ github.event.number }}-stackable-${{ github.event.number }}-merge.zip"}}]}' | |
marker: <!-- wp-playground-link --> |