@@ -5,15 +5,14 @@ name: Split packages
55on :
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
1817jobs :
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 :
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/') }}
0 commit comments