Skip to content

ci(release): update PHP action #8

ci(release): update PHP action

ci(release): update PHP action #8

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# PHP --------------------------------------------------------------------
- name: Setup PHP environment
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Validate composer.json and composer.lock
run: composer validate
- name: Get Composer cache directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Composer (cache)
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Linting PHP code
run: composer cs:php
# npm --------------------------------------------------------------------
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
# - name: Get npm cache directory
# id: npm-cache-dir
# run: |
# echo "::set-output name=dir::$(npm config get cache)"
# - name: NPM (cache)
# uses: actions/cache@v2
# id: npm-cache
# with:
# path: ${{ steps.npm-cache-dir.outputs.dir }}
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-node-
- name: Install Node.js dependencies
run: npm install
- name: Linting general code
run: npm run cs:lint
- name: Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: npx semantic-release