Skip to content

Commit 61b3388

Browse files
committed
Update artifact name handling in Python build workflow to use job outputs
1 parent 506d776 commit 61b3388

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/build.python.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ on:
1818
outputs:
1919
artifact-name:
2020
description: The name of the artifact generated by the build
21-
value: "${{ inputs.working-directory }}-${{ inputs.artifact-name }}"
21+
value: ${{ jobs.build.outputs.artifact-name }}
2222

2323
jobs:
2424
build:
2525
name: Build Python
2626
runs-on: ubuntu-latest
27+
outputs:
28+
artifact-name: ${{ steps.artifact-name.outputs.artifact-name }}
2729

2830
steps:
2931
- uses: actions/checkout@v4
@@ -48,10 +50,14 @@ jobs:
4850
uv pip install dist/*.whl --target ./out
4951
find ./out/ -name "__pycache__" -type d -exec rm -rf {} \;
5052
53+
- name: Determine artifact name
54+
id: artifact-name
55+
run: echo "artifact-name=${{ replace(format('{0}-{1}', inputs.working-directory, inputs.artifact-name), '/', '-') }}" >> $GITHUB_OUTPUT
56+
5157
- name: Store build as Artifact
5258
uses: actions/upload-artifact@v4
5359
id: upload-artifact
5460
with:
55-
name: "${{ inputs.working-directory }}-${{ inputs.artifact-name }}"
61+
name: ${{ steps.artifact-name.outputs.artifact-name }}
5662
path: ${{ inputs.working-directory }}/out
5763
retention-days: 5

0 commit comments

Comments
 (0)