Merge pull request #15 from KaririCode-Framework/develop #2
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-phar: | |
| name: Build kcode.phar | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| extensions: phar, zlib | |
| ini-values: phar.readonly=0 | |
| tools: composer:v2 | |
| - name: Compile PHAR | |
| run: | | |
| php -d phar.readonly=0 bin/build-phar.php | |
| ls -lh build/kcode.phar | |
| - name: Verify PHAR | |
| run: | | |
| php build/kcode.phar --version | |
| php build/kcode.phar --help | |
| echo "✓ PHAR verification passed" | |
| - name: Self-test | |
| run: | | |
| php build/kcode.phar init | |
| php build/kcode.phar migrate --dry-run | |
| echo "✓ Self-test passed" | |
| - name: Extract version from tag | |
| id: version | |
| run: echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.version.outputs.tag }} | |
| name: KaririCode Devkit ${{ steps.version.outputs.tag }} | |
| draft: false | |
| prerelease: false | |
| files: build/kcode.phar | |
| body: | | |
| ## Installation | |
| ### PHAR (standalone) | |
| ```bash | |
| wget https://github.com/kariricode/devkit/releases/download/${{ steps.version.outputs.tag }}/kcode.phar | |
| chmod +x kcode.phar | |
| sudo mv kcode.phar /usr/local/bin/kcode | |
| ``` | |
| ### Composer | |
| ```bash | |
| composer require --dev kariricode/devkit | |
| ``` | |
| ## Quick Start | |
| ```bash | |
| kcode init | |
| kcode migrate | |
| kcode quality | |
| ``` | |
| See [CHANGELOG.md](CHANGELOG.md) for details. |