Skip to content

Commit

Permalink
Add Update Link section to Action
Browse files Browse the repository at this point in the history
  • Loading branch information
ejohb committed Mar 26, 2023
1 parent 4cc2eb2 commit 41ccb3a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
env:
VERSION: ${{ github.event.inputs.version }}
NAME: ${{ github.event.repository.name }}
ORG: ${{ github.repository_owner }}
REBRANDLY_API_KEY: ${{ secrets.REBRANDLY_API_KEY }}
LINK_ID: 468cadc01bce4dda9b8a81f7789b0023

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -51,3 +54,9 @@ jobs:
files: hct.tapp
tag_name: v${{ github.event.inputs.version }}
generate_release_notes: true

- name: Update Link
run: |
URL=https://github.com/${ORG}/${NAME}/releases/download/v${VERSION}/${NAME}.tapp
DATA="{\"destination\": \"${URL}\"}"
curl --request POST --url https://api.rebrandly.com/v1/links/${LINK_ID} --header 'accept: application/json' --header "apikey: ${REBRANDLY_API_KEY}" --header 'content-type: application/json' --data "$DATA"

0 comments on commit 41ccb3a

Please sign in to comment.