Skip to content

Commit

Permalink
Update dispatch.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
dmzoneill committed Apr 2, 2024
1 parent 7da3eb1 commit d0400b8
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/dispatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,18 @@ jobs:
name: ${{ env.PACKAGE_NAME }}_${{ env.PACKAGE_VERSION }}.deb
path: ./*.deb

- name: Check if release already exists
id: check_release
run: |
RELEASE_EXISTS=$(curl -s -o /dev/null -w "%{http_code}" https://api.github.com/repos/${{ github.repository }}/releases/tags/v${{ env.PACKAGE_VERSION }})
if [[ $RELEASE_EXISTS -eq 404 ]]; then
echo "RELEASE_EXISTS=false" >> $GITHUB_ENV
else
echo "RELEASE_EXISTS=true" >> $GITHUB_ENV
fi
- name: Create GitHub release
if: env.RELEASE_EXISTS == 'false'
id: create_release
uses: actions/create-release@v1
env:
Expand Down Expand Up @@ -999,7 +1010,18 @@ jobs:
name: ${{ env.PACKAGE_NAME }}-0.${{ env.PACKAGE_VERSION }}.rpm
path: ./rpmbuild/RPMS/x86_64/${{ env.PACKAGE_NAME }}-${{ env.PACKAGE_VERSION }}-1.x86_64.rpm

- name: Check if release already exists
id: check_release
run: |
RELEASE_EXISTS=$(curl -s -o /dev/null -w "%{http_code}" https://api.github.com/repos/${{ github.repository }}/releases/tags/v${{ env.PACKAGE_VERSION }})
if [[ $RELEASE_EXISTS -eq 404 ]]; then
echo "RELEASE_EXISTS=false" >> $GITHUB_ENV
else
echo "RELEASE_EXISTS=true" >> $GITHUB_ENV
fi
- name: Create GitHub release
if: env.RELEASE_EXISTS == 'false'
id: create_release
uses: actions/create-release@v1
env:
Expand Down

0 comments on commit d0400b8

Please sign in to comment.