diff --git a/.github/workflows/assets.yaml b/.github/workflows/assets.yaml index 4fab94750..41217e97e 100644 --- a/.github/workflows/assets.yaml +++ b/.github/workflows/assets.yaml @@ -15,23 +15,26 @@ env: TAG_NAME: ${{ github.event.release.tag_name || github.event.inputs.tag }} jobs: - get-upload-url-release: - name: Get upload URL for automated releases - if: ${{ github.event.release.tag_name }} - run: echo "GITHUB_UPLOAD_URL=${{ github.event.release.upload_url }}" >> $GITHUB_ENV - get-upload-url-manual: - name: Get upload URL for manually triggered releases - if: ${{ github.event.inputs.tag }} - uses: actions/github-script@v7 - id: get-upload-url - with: - script: | - github.rest.repos.getReleaseByTag({ - owner: context.repo.owner, - repo: context.repo.repo, - tag: "${{ github.event.inputs.tag }}" - }); - run: echo "GITHUB_UPLOAD_URL=${{ steps.get-upload-url.outputs.upload_url }}" >> $GITHUB_ENV + get-upload-url: + runs-on: ubuntu-latest + steps: + - name: Get upload URL for automated releases + if: ${{ github.event.release.tag_name }} + run: echo "GITHUB_UPLOAD_URL=${{ github.event.release.upload_url }}" >> $GITHUB_ENV + - name: Get upload URL for manually triggered releases + if: ${{ github.event.inputs.tag }} + id: get-upload-url + uses: actions/github-script@v7 + with: + script: | + github.rest.repos.getReleaseByTag({ + owner: context.repo.owner, + repo: context.repo.repo, + tag: "${{ github.event.inputs.tag }}" + }); + - name: Set environment variable + if: ${{ github.event.inputs.tag }} + run: echo "GITHUB_UPLOAD_URL=${{ steps.get-upload-url.outputs.upload_url }}" >> $GITHUB_ENV proto-assets: runs-on: ubuntu-latest steps: