0.0.1-beta1 #4
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: Build unminified and release | |
| on: | |
| release: | |
| types: | |
| - created | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '7.4' | |
| - name: Setup composer | |
| run: composer setup | |
| - name: Setup Node.js 22.16.0 | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: "22.16.0" | |
| - name: Install pnpm globally | |
| run: npm install -g pnpm@latest-10 | |
| # Cache node_modules | |
| - name: Cache Node.js dependencies | |
| if: always() | |
| uses: actions/cache@v3 | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Install pnpm dependencies | |
| run: pnpm install | |
| - name: Compile Scripts | |
| run: pnpm start --no-watch | |
| - name: Fix Text Domain | |
| run: pnpm fixtextdomain | |
| - name: Generate Text Domain POT file | |
| run: composer make-unminified-pot | |
| - name: Remove Composer Dev Dependencies | |
| run: composer build | |
| - name: Build plugin | |
| run: pnpm git-compress | |
| - name: Create zip file | |
| run: | | |
| tag_name=$(git describe --tags --abbrev=0) | |
| zip -r "directorist-gutenberg.unminify.${tag_name}.zip" directorist-gutenberg | |
| - name: Upload zip file as a release asset | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: directorist-gutenberg*.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |