Skip to content

Commit

Permalink
release client files
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedvaziry committed Dec 14, 2024
1 parent 4647bc0 commit 02289a0
Show file tree
Hide file tree
Showing 3 changed files with 169 additions and 90 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Manual Release

on:
workflow_dispatch:
inputs:
version:
description: 'Version to release (e.g., v1.0.0)'
required: true
type: string

jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ '7.4', '8.0', '8.1', '8.2', '8.3' ]

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Setup PHP for Current Version
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer

- name: Remove Vendor and Composer Lock
run: |
rm -rf vendor composer.lock
- name: Install Dependencies
run: composer install --no-dev

- name: Setup PHP for Box
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: composer

- name: Install Box Globally
run: |
composer global require humbug/box
env:
COMPOSER_HOME: ${{ runner.temp }}/composer

- name: Add Composer Global Bin to PATH
run: echo "$COMPOSER_HOME/vendor/bin" >> $GITHUB_PATH
env:
COMPOSER_HOME: ${{ runner.temp }}/composer

- name: Compile with Box
run: |
box compile
env:
COMPOSER_HOME: ${{ runner.temp }}/composer

- name: Rename PHAR File
run: |
mv client.phar client-${{ matrix.php-version }}.phar
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
draft: false
prerelease: false

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./client-${{ matrix.php-version }}.phar
asset_name: client-${{ matrix.php-version }}.phar
asset_content_type: application/octet-stream
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
}
],
"require": {
"php": ">=7.0",
"php": ">=7.4",
"ext-json": "*",
"psy/psysh": "^0.12.4"
}
"psy/psysh": "*"
},
"minimum-stability": "stable",
"prefer-stable": true
}
Loading

0 comments on commit 02289a0

Please sign in to comment.