Skip to content

Commit

Permalink
check for release
Browse files Browse the repository at this point in the history
Signed-off-by: Conrad Hübler <Conrad.Huebler@gmx.net>
  • Loading branch information
conradhuebler committed Dec 27, 2024
1 parent 4e77a95 commit ece35cc
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,24 @@ jobs:
run: |
sudo zypper --non-interactive install curl
- name: Get Release ID
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
RELEASE_ID=$(curl -H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/conradhuebler/harbour-tidalplayer/releases/tags/master | \
grep -o '"id": [0-9]*' | head -1 | cut -d' ' -f2)
echo "RELEASE_ID=$RELEASE_ID" >> $GITHUB_ENV
- name: Upload to Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd /home/mersdk/harbour-tidalplayer/RPMS/
curl -H "Authorization: token $GITHUB_TOKEN" \
-H "Content-Type: application/x-rpm" \
--data-binary @harbour-tidalplayer-master-1.noarch.rpm \
"https://uploads.github.com/repos/conradhuebler/harbour-tidalplayer/releases/nightly/assets?name=harbour-tidalplayer-master-1.noarch.rpm"
curl -X POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Content-Type: application/x-rpm" \
--data-binary @harbour-tidalplayer-master-1.noarch.rpm \
"https://uploads.github.com/repos/conradhuebler/harbour-tidalplayer/releases/${RELEASE_ID}/assets?name=harbour-tidalplayer-master-1.noarch.rpm"

0 comments on commit ece35cc

Please sign in to comment.