Skip to content

Commit 179d4ea

Browse files
authored
Update main.yml
1 parent add5eb9 commit 179d4ea

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ name: Build and Release
44

55
# Controls when the workflow will run
66
on:
7+
push:
8+
branches:
9+
- master
10+
11+
pull_request:
12+
branches:
13+
- master
14+
715
# Allows you to run this workflow manually from the Actions tab
816
workflow_dispatch:
917
inputs:
@@ -33,6 +41,7 @@ jobs:
3341

3442
# Runs a set of commands using the runners shell
3543
- name: Zip disk folder
44+
if: ${{ github.event_name == 'workflow_dispatch' }}
3645
run: |
3746
cd ./dist/LeetcodeSessionManager
3847
zip -r ../../LeetcodeSessionManager-${{ github.event.inputs.tag }}.zip .
@@ -42,4 +51,5 @@ jobs:
4251
with:
4352
files: ./LeetcodeSessionManager*.zip
4453
tag_name: v${{ github.run_number }}
54+
if: ${{ github.event_name == 'workflow_dispatch' }}
4555
name: Release V${{ github.event.inputs.tag }}

0 commit comments

Comments
 (0)