Skip to content

Commit 97eb861

Browse files
authored
make sure releases happen on main branch only
1 parent 0f635d6 commit 97eb861

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/build-nightly.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ jobs:
7373
overwrite: true
7474

7575
release:
76+
if: ${{ github.ref_name == 'main' }}
7677
name: "release"
7778
needs: [build]
7879
permissions:
@@ -103,9 +104,7 @@ jobs:
103104
echo "APP_VERSION=${VERSION}" >> "${GITHUB_ENV}"
104105
105106
- name: Del Previous Release
106-
run: |
107-
gh release delete "nightly" --repo "${GITHUB_REPOSITORY}" --cleanup-tag -y
108-
sleep 5
107+
run: gh release delete "nightly" --repo "${GITHUB_REPOSITORY}" --cleanup-tag -y && sleep 5
109108
env:
110109
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
111110
continue-on-error: true

0 commit comments

Comments
 (0)