Skip to content

Commit

Permalink
Merge pull request #24 from tanhongit/main
Browse files Browse the repository at this point in the history
Add new workflows
  • Loading branch information
tanhongit authored Nov 1, 2023
2 parents f6ff777 + 6a1a223 commit e5da16f
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 5 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@ name: Check & fix styling

on: [push]

permissions:
contents: write

jobs:
php-cs-fixer:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Run PHP CS Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php-cs-fixer.dist.php --allow-risky=yes

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Fix styling
12 changes: 8 additions & 4 deletions .github/workflows/setup_test.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: Setup and test
name: Setup & test

on: [ push, pull_request ]

jobs:
tests:
name: Composer setup and tests
runs-on: ubuntu-latest
name: Composer P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
php: [ '8.1', '8.2' ]
laravel: [ 10.*, 9.* ]
include:
Expand All @@ -18,11 +19,14 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install dependencies
run: |
composer install --no-interaction --no-progress --no-suggest
- name: Run tests
run: |
composer validate --strict
31 changes: 31 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Update Changelog

on:
release:
types: [released]

permissions:
contents: write

jobs:
update:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: main

- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
with:
latest-version: ${{ github.event.release.name }}
release-notes: ${{ github.event.release.body }}

- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: main
commit_message: Update CHANGELOG
file_pattern: CHANGELOG.md

0 comments on commit e5da16f

Please sign in to comment.