Skip to content

Commit

Permalink
change env key
Browse files Browse the repository at this point in the history
  • Loading branch information
alicejli committed Jan 12, 2024
1 parent 7a493d9 commit 3f26f16
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,16 @@ jobs:
- 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: ${{ AUTO_UPLOAD_URL }}"
echo "manual URL: ${{ MANUAL_UPLOAD_URL }}"
if [[ -n "${{ AUTO_UPLOAD_URL }}" ]]; then
echo "GITHUB_UPLOAD_URL=${{ AUTO_UPLOAD_URL }}" >> $GITHUB_ENV
echo "GITHUB_UPLOAD_URL=${{ AUTO_UPLOAD_URL }}" >> "$GITHUB_OUTPUT"
else
echo "GITHUB_UPLOAD_URL=${{ MANUAL_UPLOAD_URL }}" >> $GITHUB_ENV
echo "GITHUB_UPLOAD_URL=${{ MANUAL_UPLOAD_URL }}" >> "$GITHUB_OUTPUT"
fi
- uses: actions/setup-go@v5
with:
Expand All @@ -120,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 3f26f16

Please sign in to comment.