feat(ci): run the create-release.sh #6
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: Deploy Test Release | |
| on: | |
| push: | |
| branches: | |
| - build-test | |
| jobs: | |
| build-and-test: | |
| name: Build and Test Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '7.4' | |
| tools: composer | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Install PHP dependencies (production only) | |
| run: composer install --no-dev --optimize-autoloader --prefer-dist --no-interaction | |
| - name: Install Node.js dependencies | |
| run: npm ci | |
| - name: Build frontend assets | |
| run: npm run build | |
| - name: Run tests | |
| run: | | |
| chmod +x scripts/run-tests.sh | |
| ./scripts/run-tests.sh | |
| - name: Generate zip file | |
| run: | | |
| chmod +x scripts/create-release.sh | |
| ./scripts/create-release.sh | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: test-${{ github.run_number }} | |
| name: JWT Auth Test Release #${{ github.run_number }} | |
| files: | | |
| wp-api-jwt-auth.zip | |
| draft: true | |
| prerelease: true | |
| generate_release_notes: true |