Fixing Deprecation Github Actions from v3 to v4 and Update all depend… #21
Workflow file for this run
This file contains 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 Deployment | |
on: | |
pull_request: | |
push: | |
tags: | |
- v** | |
permissions: | |
contents: write | |
jobs: | |
build: | |
name: ${{ matrix.operating-system }} - PHP ${{ matrix.php-versions }} | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ubuntu-latest] | |
php-versions: ['8.2', '8.3'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP with PCOV | |
id: setup-php | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "${{ matrix.php-versions }}" | |
extensions: intl | |
coverage: pcov | |
- name: Validate composer.json and composer.lock | |
run: composer validate --strict | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ steps.setup-php.outputs.php-version }}-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php-${{ steps.setup-php.outputs.php-version }}- | |
- name: Install dependencies | |
run: composer install | |
- name: Run test suite | |
run: composer run test | |
- shell: bash | |
run: | | |
which tar && tar -czvf coverage.tar.gz build/logs/html | |
- name: Upload coverage as artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mycoverage_${{ runner.os }}_${{ matrix.php-versions }} | |
path: coverage.tar.gz | |
release: | |
name: Release tag | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create Release | |
id: create-new-release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
body: | | |
## [3.0.0] - 2025-01-30 | |
### Add | |
- Github Pages for PCOV Code Coverage php 8.2, 8.3 | |
### Change | |
- Fixing Deprecation Github Actions from v3 to v4 | |
- Using php >= 8.2, for php below that use version 2 "composer require ekojs/otp:2.0.0" | |
draft: false | |
prerelease: false | |
deploy: | |
name: Deploy Github Pages | |
needs: release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download coverage | |
uses: actions/download-artifact@v4 | |
with: | |
name: mycoverage_Linux_8.3 | |
path: coverage | |
- name: Moving artifact to workspace | |
run: | | |
mv ${{ github.workspace }}/coverage/coverage.tar.gz ${{ github.workspace }}/coverage.tar.gz | |
- shell: bash | |
run: | | |
which tar && tar -xzvf coverage.tar.gz && cd build/logs/html && mv _js js && mv _css css && mv _icons icons && for x in $(grep . -irle '_js');do sed -i'' 's/_js/js/g' $x;done && for x in $(grep . -irle '_css');do sed -i'' 's/_css/css/g' $x;done && for x in $(grep . -irle '_icons');do sed -i'' 's/_icons/icons/g' $x;done | |
- name: List files in the repository | |
run: | | |
ls ${{ github.workspace }}/build/logs/html | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: build/logs/html |