ci: opt into Node.js 24 runner #17
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 Plugin ZIP | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ["v*.*.*"] | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| zip: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Read plugin version | |
| id: version | |
| run: | | |
| VERSION=$(grep -m1 "^ \* Version:" devpulse.php | awk '{print $3}') | |
| echo "version=${VERSION}" >> "$GITHUB_OUTPUT" | |
| - name: Build ZIP | |
| run: | | |
| mkdir -p dist/devpulse | |
| rsync -r \ | |
| --exclude='.git' \ | |
| --exclude='.github' \ | |
| --exclude='.gitattributes' \ | |
| --exclude='.gitignore' \ | |
| --exclude='composer.json' \ | |
| --exclude='composer.lock' \ | |
| --exclude='vendor' \ | |
| --exclude='README.md' \ | |
| --exclude='dist' \ | |
| . dist/devpulse/ | |
| cd dist | |
| zip -r "devpulse-${{ steps.version.outputs.version }}.zip" devpulse/ | |
| echo "Built devpulse-${{ steps.version.outputs.version }}.zip" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: devpulse-${{ steps.version.outputs.version }} | |
| path: dist/devpulse-${{ steps.version.outputs.version }}.zip | |
| retention-days: 90 | |
| # Attach ZIP to the GitHub release when triggered by a version tag | |
| - name: Attach ZIP to GitHub release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/devpulse-${{ steps.version.outputs.version }}.zip |