feat: debug workflow #22
Workflow file for this run
This file contains hidden or 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: Release | |
| on: | |
| push: | |
| # tags: | |
| # - "[0-9]+.[0-9]+.[0-9]+" | |
| permissions: | |
| contents: "write" | |
| jobs: | |
| tests: | |
| name: Release tests | |
| uses: ./.github/workflows/tests.yml | |
| build: | |
| name: Build client | |
| runs-on: ubuntu-latest | |
| needs: tests | |
| steps: | |
| - name: Debug | |
| run: | | |
| echo whoami | |
| echo $PWD | |
| echo ls -l | |
| echo $TMPDIR | |
| cat /etc/os-release | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Replace textdomains | |
| run: find src -exec sed -i "s/http-bridge/forms-bridge/g" {} \; | |
| - name: Build | |
| run: npm run build | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build | |
| path: forms-bridge | |
| package: | |
| name: Prepare package | |
| runs-on: ubuntu-latest | |
| container: | |
| image: codeccoop/wp-cli | |
| env: | |
| ZIP: "${{ github.ref_name }}.zip" | |
| needs: build | |
| steps: | |
| - name: Debug | |
| run: | | |
| whoami | |
| echo $PWD | |
| ls -l / | |
| echo $TMPDIR | |
| cat /etc/os-release | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build | |
| - name: Replace textdomains | |
| run: | | |
| find forms-bridge/deps/plugin -name '*.php' -exec sed -i "s/wpct-plugin/forms-bridge/g" {} \; | |
| find forms-bridge -name '*.php' -exec sed -i "s/wpct_plugin_/forms_bridge_plugin_/g" {} \; | |
| find forms-bridge -name "*.php" -exec sed -i 's/WPCT_PLUGIN/FORMS_BRIDGE\\Common/g' {} \; | |
| find forms-bridge/deps/http -name '*.php' -exec sed -i "s/http-bridge/forms-bridge/g" {} \; | |
| find forms-bridge -name '*.php' -exec sed -i "s/http_bridge_/forms_bridge_http_/g" {} \; | |
| find forms-bridge -name "*.php" -exec sed -i 's/HTTP_BRIDGE_/FORMS_BRIDGE_HTTP_/g' {} \; | |
| find forms-bridge -name '*.php' -exec sed -i 's/HTTP_BRIDGE/FORMS_BRIDGE\\Http/g' {} \; | |
| - name: Archive | |
| run: wp dist-archive forms-bridge ./$ZIP | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: plugin-archive | |
| path: ${{ env.ZIP }} | |
| release: | |
| name: Release pushed tag | |
| runs-on: ubuntu-latest | |
| needs: package | |
| env: | |
| ZIP: "${{ github.ref_name }}.zip" | |
| steps: | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: plugin-archive | |
| path: ${{ env.ZIP }} | |
| - name: Create release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAG: ${{ github.ref_name }} | |
| run: | | |
| gh release create "$TAG" \ | |
| --repo="$GITHUB_REPOSITORY" \ | |
| --title="$TAG" \ | |
| --generate-notes \ | |
| "$ZIP" |