Skip to content

Commit

Permalink
refactor to a single job
Browse files Browse the repository at this point in the history
  • Loading branch information
alicejli committed Jan 11, 2024
1 parent 714f902 commit c3d8984
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@ 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:
if: ${{ github.event.inputs.tag }}
get-upload-url:
runs-on: ubuntu-latest
steps:
- name: Get upload URL for manually triggered releases
- 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
- 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 }}
- 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
proto-assets:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit c3d8984

Please sign in to comment.