Skip to content

Commit 6de16c0

Browse files
committed
try to fix upload_url variable sharing dilemma
1 parent 0506c62 commit 6de16c0

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

.github/workflows/publish.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,21 @@ on:
66
- release/*
77

88
jobs:
9+
create_release:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
upload_url: ${{ steps.create_release.outputs.upload_url }}
13+
steps:
14+
- name: Create GitHub Release
15+
id: create_release
16+
uses: actions/create-release@v1
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
with:
20+
tag_name: ${{ github.ref }}
21+
release_name: Release ${{ github.ref }}
922
build:
23+
needs: create_release
1024
runs-on: ${{ matrix.runs-on }}
1125
env:
1226
IS_CI: 1
@@ -220,21 +234,12 @@ jobs:
220234
name: pypccl-${{ runner.os }}-${{ matrix.build_type }}-${{ matrix.pccl_build_cuda_support == 'ON' && 'cuda' || 'nocuda' }}-${{ github.run_id }}
221235
path: ./python/framework/dist/pypccl-*.whl
222236

223-
- name: Publish GitHub Release
224-
uses: actions/create-release@v1
225-
env:
226-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
227-
with:
228-
tag_name: ${{ github.ref }}
229-
release_name: Release ${{ github.ref }}
230-
continue-on-error: true
231-
232-
- name: Upload Release Assets
237+
- name: Upload Release Asset
233238
uses: actions/upload-release-asset@v1
234239
env:
235240
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
236241
with:
237-
upload_url: ${{ github.event.release.upload_url }}
242+
upload_url: ${{ needs.create_release.outputs.upload_url }}
238243
asset_path: ${{ github.workspace }}/python/framework/dist/pypccl-*.whl
239-
asset_name: pypccl-${{ runner.os }}-${{ matrix.build_type }}-${{ matrix.pccl_build_cuda_support == 'ON' && 'cuda' || 'nocuda' }}-${{ github.run_id }}.whl
244+
asset_name: pypccl-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.pccl_build_cuda_support == 'ON' && 'cuda' || 'nocuda' }}-${{ github.run_id }}.whl
240245
asset_content_type: application/zip

0 commit comments

Comments
 (0)