Skip to content

Commit

Permalink
Testing pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
StrahinjaJacimovic committed Jun 19, 2024
1 parent 169b694 commit 544c0ea
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
jobs:
upload-release-asset:
runs-on: ubuntu-latest
if: "!github.event.release.prerelease"
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -17,7 +16,22 @@ jobs:
with:
python-version: '3.x'

- name: Check if release is a draft or pre-release
id: check_release
run: |
if [[ "${{ github.event.release.draft }}" == "true" ]]; then
echo "This is a draft release. Exiting."
exit 1
fi
if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
echo "This is a pre-release. Exiting."
exit 1
fi
echo "Release is neither a draft nor a pre-release. Continuing."
exit 0
- name: Install Dependencies
if: steps.check_release.outputs.exit_code == '0'
run: |
python -m pip install --upgrade pip
pip install aiohttp
Expand All @@ -27,6 +41,7 @@ jobs:
sudo apt-get install p7zip-full
- name: Run Release Script
if: steps.check_release.outputs.exit_code == '0'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
Expand Down

0 comments on commit 544c0ea

Please sign in to comment.