Skip to content

Commit c0b9cae

Browse files
authored
Merge pull request #157 from ock-php/issue-155-prepare-package-releases
Issue 155: Prepare package releases (new attempt)
2 parents 9916e53 + 303c805 commit c0b9cae

3 files changed

Lines changed: 27 additions & 22 deletions

File tree

.github/workflows/split.yaml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@ name: Split packages
55
on:
66
push:
77
branches:
8-
# @todo Decide to use either master or main.
98
- main
10-
- master
119
- probe
12-
- issue-*
10+
- '\d+\.x'
11+
- '\d+\.\d+\.x'
1312

1413
# see https://github.community/t/how-to-run-github-actions-workflow-only-for-new-tags/16075/10?u=tomasvotruba
1514
tags:
16-
- '*'
15+
- '^\d+\.\d+\.\d+(|\-(alpha|beta|rc)\d+)$'
1716

1817
jobs:
1918
packages_split:
@@ -23,27 +22,36 @@ jobs:
2322
fail-fast: false
2423
matrix:
2524
# define package to repository map
26-
package:
27-
- adaptism
28-
- class-discovery
29-
- class-files-iterator
30-
- codegen-tools
31-
- dependency-injection
32-
- di-discovery
33-
- egg
34-
- helpers
35-
- object-construction-kit
36-
- reflection
37-
- reflector-aware-attributes
38-
- testing
25+
include:
26+
- package: adaptism
27+
- package: class-discovery
28+
- { package: class-files-iterator, release: true}
29+
- package: codegen-tools
30+
- package: dependency-injection
31+
- package: di-discovery
32+
- package: egg
33+
- { package: helpers, release: true }
34+
- package: object-construction-kit
35+
- package: reflection
36+
- { package: reflector-aware-attributes, release: true}
37+
- package: testing
3938

4039
steps:
4140
-
41+
# Push tags only to packages marked as 'release'.
42+
if: |
43+
!startsWith(github.ref, 'refs/tags/') || matrix.release
44+
4245
name: Checkout code
4346
uses: actions/checkout@v4
4447
with:
4548
fetch-depth: 0
4649
-
50+
# Push tags only to packages marked as 'release'.
51+
# This condition has to be repeated on every step.
52+
if: |
53+
!startsWith(github.ref, 'refs/tags/') || matrix.release
54+
4755
name: Split package ${{ matrix.package }}
4856
uses: "claudiodekker/splitsh-action@v1.0.0"
4957
env:
@@ -52,4 +60,4 @@ jobs:
5260
prefix: "packages/${{ matrix.package }}"
5361
remote: "https://github.com/ock-php/${{ matrix.package }}.git"
5462
reference: "${{ github.ref_name }}"
55-
as_tag: "${{ startsWith(github.ref, 'refs/tags/') }}"
63+
as_tag: ${{ startsWith(github.ref, 'refs/tags/') }}

packages/reflection/.github/workflows/ci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
- uses: shivammathur/setup-php@v2
2020
with:
2121
php-version: ${{ matrix.php }}
22-
extensions: json
2322
coverage: none
2423
- run: composer install --prefer-dist --no-interaction --no-progress
2524
- run: composer update --no-progress ${{ matrix.composer-flags }}

packages/reflection/composer.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
}
2020
},
2121
"require": {
22-
"php": ">=8.3",
23-
"ock/helpers": "self.version",
24-
"ext-json": "*"
22+
"php": ">=8.3"
2523
},
2624
"require-dev": {
2725
"phpunit/phpunit": "^10.5.38"

0 commit comments

Comments
 (0)