Skip to content

Commit

Permalink
github auto-release cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoniRokitnicki committed May 12, 2024
1 parent 03eba00 commit 6c1fbf6
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,12 @@ jobs:
- name: Print Debug Information
run: |
echo "Event Name: ${{ github.event_name }}"
event_name_check=$(if [[ "${{ github.event_name }}" == 'workflow_dispatch' ]]; then echo "true"; else echo "false"; fi)
echo "Is PR Merged?: ${{ github.event.pull_request.merged }}"
merged_check=$(if [[ "${{ github.event.pull_request.merged }}" == 'true' ]]; then echo "true"; else echo "false"; fi)
echo "PR Labels: ${{ toJson(github.event.pull_request.labels.*.name) }}"
labels_check=$(if [[ $(contains(github.event.pull_request.labels.*.name, 'autorelease')) == 'true' ]]; then echo "true"; else echo "false"; fi)
echo "Contains 'autorelease' Label: $labels_check"
echo "Workflow Dispatch Triggered: $event_name_check"
push_event_check=$(if [[ "${{ github.event_name }}" == 'pull_request' && "${{ github.event.pull_request.merged }}" == 'true' ]]; then echo "true"; else echo "false"; fi)
echo "Push Event and PR Merged: $push_event_check"
if [[ $event_name_check == 'true' || ($event_name_check == 'false' && $merged_check == 'true' && $labels_check == 'true') ]]; then
echo "Overall Condition: true"
else
echo "Overall Condition: false"
fi
echo "Workflow Dispatch Triggered: ${{ github.event_name == 'workflow_dispatch' }}"
echo "Push Event and PR Merged: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true }}"
echo "PR contains 'autorelease' label: ${{ contains(github.event.pull_request.labels.*.name, 'autorelease') }}"
# Prepare and publish the plugin to JetBrains Marketplace repository
release:
Expand Down

0 comments on commit 6c1fbf6

Please sign in to comment.