Skip to content

Commit

Permalink
chore: fix workflow upload url (#1426)
Browse files Browse the repository at this point in the history
* chore: fix workflow output var

* change env key

* fix indentation
  • Loading branch information
alicejli authored Jan 12, 2024
1 parent 53854b3 commit 14a58bc
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,19 @@ jobs:
- os: windows
arch: amd64
steps:
- name: Determine which upload URL to use
- env:
AUTO_UPLOAD_URL: ${{ needs.get-upload-url.outputs.automated_upload_url }}"
MANUAL_UPLOAD_URL: ${{ needs.get-upload-url.outputs.manual_upload_url }}"
GITHUB_TOKEN: ${{ github.token }}
name: Determine which upload URL to use
id: determine_upload_url
run: |
echo "automated URL: ${{ needs.get-upload-url.outputs.automated_upload_url }}"
echo "manual URL: ${{ needs.get-upload-url.outputs.manual_upload_url }}"
if [[ -n "${{ needs.get-upload-url.outputs.automated_upload_url }}" ]]; then
echo "GITHUB_UPLOAD_URL=${{ needs.get-upload-url.outputs.automated_upload_url }}" >> $GITHUB_ENV
echo "automated URL: ${{ AUTO_UPLOAD_URL }}"
echo "manual URL: ${{ MANUAL_UPLOAD_URL }}"
if [[ -n "${{ AUTO_UPLOAD_URL }}" ]]; then
echo "GITHUB_UPLOAD_URL=${{ AUTO_UPLOAD_URL }}" >> "$GITHUB_OUTPUT"
else
echo "GITHUB_UPLOAD_URL=${{ needs.get-upload-url.outputs.manual_upload_url }}" >> $GITHUB_ENV
echo "GITHUB_UPLOAD_URL=${{ MANUAL_UPLOAD_URL }}" >> "$GITHUB_OUTPUT"
fi
- uses: actions/setup-go@v5
with:
Expand All @@ -117,11 +121,8 @@ jobs:
tar cvfz gapic-showcase.tar.gz gapic-showcase*
- name: Upload the ${{ matrix.osarch.os }}/${{ matrix.osarch.arch }} release.
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_UPLOAD_URL: ${{ env.GITHUB_UPLOAD_URL }}
with:
upload_url: ${{ env.GITHUB_UPLOAD_URL }}
upload_url: ${{ steps.determine_upload_url.outputs.GITHUB_UPLOAD_URL }}
asset_path: ./gapic-showcase.tar.gz
asset_name: gapic-showcase-${{ steps.raw_tag.outputs.raw_version }}-${{ matrix.osarch.os }}-${{ matrix.osarch.arch }}.tar.gz
asset_content_type: application/tar+gzip
Expand Down

0 comments on commit 14a58bc

Please sign in to comment.