diff --git a/.github/workflows/build-cli.yml b/.github/workflows/build-cli.yml index 314d46f85..083df5024 100644 --- a/.github/workflows/build-cli.yml +++ b/.github/workflows/build-cli.yml @@ -3,11 +3,11 @@ name: Build blazecli on: workflow_call: inputs: - upload: - description: 'Whether to upload created artifacts to the current release' - default: false + upload-release: + description: 'The release to upload artifacts to, if any' + default: '' required: false - type: boolean + type: string workflow_dispatch: jobs: @@ -35,10 +35,10 @@ jobs: with: name: blazecli-${{ matrix.target }} path: bin/blazecli - - if: ${{ inputs.upload }} + - if: ${{ inputs.upload-release != '' }} name: Upload release asset env: GH_TOKEN: ${{ github.token }} run: | mv bin/blazecli blazecli-${{ matrix.target }} - gh release upload assets blazecli-${{ matrix.target }} + gh release upload assets ${{ inputs.upload-release }} blazecli-${{ matrix.target }} diff --git a/.github/workflows/publish-cli.yml b/.github/workflows/publish-cli.yml index bd01fd334..ffadfa2c2 100644 --- a/.github/workflows/publish-cli.yml +++ b/.github/workflows/publish-cli.yml @@ -52,7 +52,8 @@ jobs: \"make_latest\":\"false\" }" build-artifacts: + needs: [publish, version] uses: ./.github/workflows/build-cli.yml secrets: inherit with: - upload: true + upload-release: cli-v${{ needs.version.outputs.version }}