Skip to content

Commit 528006e

Browse files
Maffoochclaudemtesauro
authored
chore: replace archived upload-release-asset with gh release upload (#15110)
The archived actions/upload-release-asset runs on the node12 runtime and has no Node 24 release. Replace it with a 'gh release upload' step (GitHub CLI, no action runtime) and surface release-drafter's tag_name output. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Matt Tesauro <mtesauro@gmail.com>
1 parent 99df6c4 commit 528006e

1 file changed

Lines changed: 7 additions & 21 deletions

File tree

.github/workflows/release-drafter.yml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
update_release_draft:
2424
runs-on: ubuntu-latest
2525
outputs:
26-
upload_url: ${{ steps.create_release.outputs.upload_url }}
26+
tag_name: ${{ steps.create_release.outputs.tag_name }}
2727
steps:
2828
- name: Create Release
2929
id: create_release
@@ -51,26 +51,12 @@ jobs:
5151
with:
5252
pattern: oas-*
5353

54-
- name: Upload Release Asset - OpenAPI Specification - YAML
55-
id: upload-release-asset-yaml
56-
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
54+
- name: Upload OAS schemas to release
5755
env:
58-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59-
with:
60-
upload_url: ${{ needs.update_release_draft.outputs.upload_url }}
61-
asset_path: ./oas-yaml/oas.yaml
62-
asset_name: oas.yaml
63-
asset_content_type: application/vnd.oai.openapi
64-
65-
- name: Upload Release Asset - OpenAPI Specification - JSON
66-
id: upload-release-asset-json
67-
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
68-
env:
69-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70-
with:
71-
upload_url: ${{ needs.update_release_draft.outputs.upload_url }}
72-
asset_path: ./oas-json/oas.json
73-
asset_name: oas.json
74-
asset_content_type: application/json
56+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
run: |
58+
gh release upload "${{ needs.update_release_draft.outputs.tag_name }}" \
59+
./oas-yaml/oas.yaml ./oas-json/oas.json \
60+
--clobber --repo "${{ github.repository }}"
7561
7662

0 commit comments

Comments
 (0)