Skip to content

Commit 40067c8

Browse files
committed
chore: create artifact during php package build
make sure that each release will be added from artifact during package build process fix: make sure that proper file paths are updated by release please chore(phar): use artifacts from most recent commit/merge in main branch for release
1 parent 97a3752 commit 40067c8

File tree

3 files changed

+19
-28
lines changed

3 files changed

+19
-28
lines changed

.github/workflows/php-package.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
run: |
5151
chmod +x ./phar-composer-${{ env.PHAR_TOOL_VERSION }}.phar
5252
./phar-composer-${{ env.PHAR_TOOL_VERSION }}.phar build ./ mysql2jsonl
53-
54-
55-
56-
53+
- uses: actions/upload-artifact@v4
54+
with:
55+
name: build-${{ github.sha }}-${{ matrix.php-version }}
56+
path: mysql2jsonl

.github/workflows/release-please.yml

+11-20
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,26 @@ jobs:
1919
needs: verify-release
2020
runs-on: ubuntu-24.04
2121
outputs:
22-
release_created: ${{ steps.release.outputs.release_created }}
22+
release_created: ${{ steps.release.outputs.releases_created }}
2323
tag: ${{ steps.release.outputs.tag_name }}
2424
steps:
2525
- uses: googleapis/release-please-action@v4
2626
id: release
2727
with:
2828
release-type: php
2929
upload_phar:
30-
needs: release-please
30+
needs:
31+
- release-please
32+
- verify-release
3133
runs-on: ubuntu-24.04
32-
if: ${{ needs.release-please.outputs.release_created == true }}
34+
if: ${{ needs.release-please.outputs.release_created }}
3335
steps:
34-
- uses: actions/checkout@v4
36+
- name: Download release artifact
37+
uses: actions/download-artifact@v4
3538
with:
36-
ref: ${{ needs.release-please.outputs.tag }}
37-
- name: Setup PHP
38-
uses: shivammathur/setup-php@v2
39-
with:
40-
php-version: 8.2
41-
tools: composer:v2
42-
- name: Download build package
43-
run: gh release download v${{ env.PHAR_TOOL_VERSION }} -R=${{ env.PHAR_TOOL_REPOSITORY }}
44-
- name: Build package
45-
run: |
46-
chmod +x ./phar-composer-${{ env.PHAR_TOOL_VERSION }}.phar
47-
./phar-composer-${{ env.PHAR_TOOL_VERSION }}.phar build ./ mysql2json
48-
env:
49-
GH_TOKEN: ${{ github.token }}
50-
- name: Upload package
51-
run: gh release upload ${{ needs.release-please.outputs.tag }} mysql2json
39+
name: build-${{ github.sha }}-8.3
40+
path: mysql2jsonl
41+
- name: Release artifact
42+
run: gh release upload ${{ needs.release-please.outputs.tag }} mysql2jsonl
5243
env:
5344
GH_TOKEN: ${{ github.token }}

release-please-config.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"bump-patch-for-minor-pre-major": false,
88
"draft": false,
99
"include-v-in-tag": false,
10-
"prerelease": false,
11-
"extra-files": [
12-
"bin/mysql2jsonl"
13-
]
10+
"prerelease": false
1411
}
1512
},
13+
"extra-files": [
14+
"bin/mysql2jsonl"
15+
],
1616
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
1717
}

0 commit comments

Comments
 (0)