Skip to content

v1.1.3

v1.1.3 #11

Workflow file for this run

name: Build and Distribute SQLite Command Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Install dependencies
run: composer install --no-dev --optimize-autoloader --ignore-platform-reqs
- name: Set release version
id: set_version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Create version file
run: echo "${{ env.RELEASE_VERSION }}" > version
- name: Create distribution
run: |
mkdir temp_dist
rsync -av \
--exclude-from='.distignore' \
--exclude='.git' \
--exclude='.github' \
--exclude='temp_dist' \
. temp_dist/
cp version temp_dist/
- name: Create ZIP archive
run: |
cd temp_dist
zip -r ../wp-cli-sqlite-command-${{ env.RELEASE_VERSION }}.zip .
- name: Clean up
run: rm -rf temp_dist version
- name: Upload distribution as artifact
uses: actions/upload-artifact@v4
with:
name: wp-cli-sqlite-command-${{ env.RELEASE_VERSION }}
path: wp-cli-sqlite-command-${{ env.RELEASE_VERSION }}.zip
- name: Upload to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./wp-cli-sqlite-command-${{ env.RELEASE_VERSION }}.zip
asset_name: wp-cli-sqlite-command-${{ env.RELEASE_VERSION }}.zip
asset_content_type: application/zip