Skip to content

Commit 1a7d296

Browse files
committed
fix CI workflows
1 parent 4abbbd8 commit 1a7d296

File tree

4 files changed

+40
-21
lines changed

4 files changed

+40
-21
lines changed

.github/workflows/phpstan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: phpstan
22

3-
on: [ push, pull_request ]
3+
on: [push, pull_request]
44

55
jobs:
66
analyze:
@@ -15,7 +15,7 @@ jobs:
1515
- name: 🏗 Setup PHP
1616
uses: shivammathur/setup-php@v2
1717
with:
18-
php-version: '8.3'
18+
php-version: "8.4"
1919
coverage: none
2020
tools: phpstan
2121

.github/workflows/pint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: pint
22

3-
on: [ push, pull_request ]
3+
on: [push, pull_request]
44

55
jobs:
66
analyze:
@@ -15,7 +15,7 @@ jobs:
1515
- name: 🏗 Setup PHP
1616
uses: shivammathur/setup-php@v2
1717
with:
18-
php-version: '8.3'
18+
php-version: "8.4"
1919
coverage: none
2020
tools: laravel/pint
2121

.github/workflows/publish.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,35 @@ name: Publish
33
on:
44
push:
55
tags:
6-
- '**'
6+
- "**"
77

88
jobs:
9+
# @see https://stackoverflow.com/a/72959712/8179249
10+
check-current-branch:
11+
runs-on: ubuntu-latest
12+
13+
outputs:
14+
branch: ${{ steps.check_step.outputs.branch }}
15+
16+
steps:
17+
- name: 🏗 Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: 🏗 Get current branch
23+
id: check_step
24+
run: |
25+
raw=$(git branch -r --contains ${{ github.ref }})
26+
branch="$(echo ${raw//origin\//} | tr -d '\n')"
27+
echo "{name}=branch" >> $GITHUB_OUTPUT
28+
echo "Branches where this tag exists : $branch."
29+
930
build:
1031
runs-on: ubuntu-latest
32+
33+
needs: check-current-branch
34+
1135
steps:
1236
- name: 🏗 Checkout code
1337
uses: actions/checkout@v4
@@ -23,6 +47,6 @@ jobs:
2347
uses: softprops/action-gh-release@v2
2448
with:
2549
body: ${{ steps.query-release-info.outputs.release-notes }}
26-
make_latest: ${{ github.ref_name == 'main' && true || false }}
50+
make_latest: contains(${{ needs.check.outputs.branch }}, 'main')
2751
# prerelease: true
2852
# files: '*.vsix'

.github/workflows/tests.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: tests
22

3-
on: [ push, pull_request ]
3+
on: [push, pull_request]
44

55
jobs:
66
test:
@@ -9,22 +9,16 @@ jobs:
99
strategy:
1010
fail-fast: true
1111
matrix:
12-
os: [ ubuntu-latest ]
13-
php: [ 8.1, 8.2, 8.3 ]
14-
stability: [ prefer-stable ]
15-
laravel: [ 9.*, 10.*, 11.* ]
12+
os: [ubuntu-latest]
13+
php: [8.2, 8.3, 8.4]
14+
stability: [prefer-stable]
15+
laravel: [11.*, 12.*]
1616
include:
17-
- laravel: 9.*
18-
testbench: 7.*
19-
20-
- laravel: 10.*
21-
testbench: 8.*
22-
2317
- laravel: 11.*
2418
testbench: 9.*
25-
exclude:
26-
- php: 8.1
27-
laravel: 11.*
19+
20+
- laravel: 12.*
21+
testbench: 10.*
2822

2923
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
3024

@@ -58,9 +52,10 @@ jobs:
5852
run: vendor/bin/phpunit -c phpunit.coverage.dist.xml
5953

6054
- name: 🚀 Upload coverage reports to Codecov
61-
uses: codecov/codecov-action@v4
55+
uses: codecov/codecov-action@v5
6256
with:
6357
token: ${{ secrets.CODECOV_TOKEN }}
58+
flags: php${{ matrix.php }}-laravel${{ matrix.laravel }}
6459
files: ./clover.xml
6560
fail_ci_if_error: true
6661
# verbose: true

0 commit comments

Comments
 (0)