Skip to content

Commit

Permalink
Merge pull request AntelopeIO#247 from AntelopeIO/release_4x
Browse files Browse the repository at this point in the history
[4.0] on release, upload .deb as release asset automatically
  • Loading branch information
spoonincode authored Nov 7, 2023
2 parents 26f8d67 + dd0887c commit 21b4ab6
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Upload Release .deb

on:
release:
types: [published]

jobs:
eb:
name: Upload Release .deb
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
actions: read
steps:
- name: Get cdt.deb
id: getter
uses: AntelopeIO/asset-artifact-download-action@v3
with:
owner: ${{github.repository_owner}}
repo: ${{github.event.repository.name}}
file: cdt_.*_amd64.deb
target: ${{github.sha}}
artifact-name: cdt_ubuntu_package_amd64
wait-for-exact-target: true
- run: |
curl -LsSf \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{github.token}}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/octet-stream" \
--data-binary "@${{steps.getter.outputs.downloaded-file}}" \
"https://uploads.github.com/repos/${{github.repository}}/releases/${{github.event.release.id}}/assets?name=${{steps.getter.outputs.downloaded-file}}"

0 comments on commit 21b4ab6

Please sign in to comment.