Skip to content

Commit c53c215

Browse files
committed
Use inputs.version to pass version
1 parent cf85c7c commit c53c215

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.github/workflows/package-release.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
name: "Package Release"
2-
run-name: "Package Release ${{ github.ref_name }}"
2+
run-name: "Package Release ${{ inputs.version }}"
33

44
on:
55
workflow_call:
66
inputs:
7+
version:
8+
description: "The version being built"
9+
type: string
10+
required: true
711
ref:
812
description: "The git reference to build"
913
type: string
@@ -46,7 +50,7 @@ jobs:
4650
-H "Accept: application/vnd.github+json" \
4751
-H "X-GitHub-Api-Version: 2022-11-28" \
4852
/repos/${{ github.repository }}/releases/generate-notes \
49-
-f "tag_name=${{ inputs.ref }}" --jq '.body' > changelog
53+
-f "tag_name=${{ inputs.version }}" --jq '.body' > changelog
5054
5155
# This will fill in the release notes from the previously generated changelog
5256
- name: "Build package.xml"
@@ -86,7 +90,7 @@ jobs:
8690
retention-days: 3
8791

8892
- name: "Upload release artifacts"
89-
run: gh release upload ${{ github.ref_name }} ${{ env.PACKAGE_FILE }} ${{ env.PACKAGE_FILE }}.sig
93+
run: gh release upload ${{ inputs.version }} ${{ env.PACKAGE_FILE }} ${{ env.PACKAGE_FILE }}.sig
9094
continue-on-error: true
9195

9296
build-windows:
@@ -192,7 +196,7 @@ jobs:
192196
- name: "Upload DLL and PDB files as build artifacts"
193197
uses: actions/upload-artifact@v4
194198
with:
195-
name: php_mongodb-${{ github.ref_name }}-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.arch }}
199+
name: php_mongodb-${{ inputs.version }}-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.arch }}
196200
path: |
197201
php_mongodb.dll
198202
php_mongodb.dll.sig
@@ -206,7 +210,7 @@ jobs:
206210

207211
- name: "Create and upload release artifact"
208212
run: |
209-
ARCHIVE=php_mongodb-${{ github.ref_name }}-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.arch }}.zip
213+
ARCHIVE=php_mongodb-${{ inputs.version }}-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.arch }}.zip
210214
zip ${ARCHIVE} php_mongodb.dll php_mongodb.dll.sig php_mongodb.pdb CREDITS CONTRIBUTING.md LICENSE README.md THIRD_PARTY_NOTICES
211-
gh release upload ${{ github.ref_name }} ${ARCHIVE}
215+
gh release upload ${{ inputs.version }} ${ARCHIVE}
212216
continue-on-error: true

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ jobs:
154154
name: "Create Release Packages"
155155
uses: ./.github/workflows/package-release.yml
156156
with:
157+
version: ${{ inputs.version }}
157158
ref: refs/tags/${{ inputs.version }}
158159
secrets: inherit
159160
permissions:

0 commit comments

Comments
 (0)