This repository was archived by the owner on May 30, 2025. It is now read-only.
Blueprints v2 all-PHP Runner (#9) #14
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 and Release | |
on: | |
push: | |
branches: | |
- trunk | |
jobs: | |
build-and-release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.0' # Specify the PHP version you need | |
- name: Install Composer dependencies | |
run: composer install --no-dev --prefer-dist | |
- name: Install Box | |
run: composer global require humbug/box | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '22' | |
- name: Install npm dependencies for static-files-editor | |
run: | | |
cd plugins/static-files-editor | |
npm install | |
- name: Build all components | |
run: bash bin/build-all.sh | |
- name: Create GitHub Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ github.run_number }} | |
release_name: Data Liberation plugin v${{ github.run_number }} | |
draft: false | |
prerelease: false | |
- name: Upload Data Liberation Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./dist/plugins/data-liberation.zip | |
asset_name: data-liberation.zip | |
asset_content_type: application/zip | |
- name: Upload URL Updater Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./dist/plugins/url-updater.zip | |
asset_name: url-updater.zip | |
asset_content_type: application/zip | |
- name: Upload Static Files Editor Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./dist/plugins/static-files-editor.zip | |
asset_name: static-files-editor.zip | |
asset_content_type: application/zip | |
- name: Upload Import Static Files Example Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./dist/examples/create-wp-site.tar.gz | |
asset_name: create-wp-site.tar.gz | |
asset_content_type: application/gzip | |
- name: Upload Blueprints Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./dist/blueprints.phar | |
asset_name: blueprints.phar | |
asset_content_type: application/phar |