Merge pull request #415 from ttytm/ci/fix-release-cond

Fix condition for release steps when pushing tags
This commit is contained in:
Turiiya 2024-06-15 22:06:05 +02:00 committed by GitHub
commit 9518b9e844
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 5 deletions

View File

@ -127,7 +127,9 @@ jobs:
with:
tag_name: nightly
- name: Release
if: github.repository_owner == 'webui-dev' && github.ref_name == 'main' && github.event_name == 'push'
if: >
github.repository_owner == 'webui-dev'
&& (github.ref_type == 'tag' || (github.ref_name == 'main' && github.event_name == 'push'))
uses: ncipollo/release-action@v1
with:
artifacts: ${{ env.ARTIFACT }}.zip

View File

@ -85,7 +85,9 @@ jobs:
name: ${{ env.ARTIFACT }}
path: ${{ env.ARTIFACT }}
- name: Prepare Release
if: github.repository_owner == 'webui-dev' && github.ref_name == 'main' && github.event_name == 'push'
if: >
github.repository_owner == 'webui-dev'
&& (github.ref_type == 'tag' || (github.ref_name == 'main' && github.event_name == 'push'))
run: |
zip -r "$ARTIFACT.zip" "$ARTIFACT"
if [ $GITHUB_REF_TYPE == tag ]; then
@ -106,7 +108,9 @@ jobs:
with:
tag_name: nightly
- name: Release
if: github.repository_owner == 'webui-dev' && github.ref_name == 'main' && github.event_name == 'push'
if: >
github.repository_owner == 'webui-dev'
&& (github.ref_type == 'tag' || (github.ref_name == 'main' && github.event_name == 'push'))
uses: ncipollo/release-action@v1
with:
artifacts: ${{ env.ARTIFACT }}.zip

View File

@ -93,7 +93,9 @@ jobs:
name: ${{ env.ARTIFACT }}
path: ${{ env.ARTIFACT }}
- name: Prepare Release
if: github.repository_owner == 'webui-dev' && github.ref_name == 'main' && github.event_name == 'push'
if: >
github.repository_owner == 'webui-dev'
&& (github.ref_type == 'tag' || (github.ref_name == 'main' && github.event_name == 'push'))
shell: bash
run: |
7z a -tzip "$ARTIFACT.zip" "$ARTIFACT/*"
@ -115,7 +117,9 @@ jobs:
with:
tag_name: nightly
- name: Release
if: github.repository_owner == 'webui-dev' && github.ref_name == 'main' && github.event_name == 'push'
if: >
github.repository_owner == 'webui-dev'
&& (github.ref_type == 'tag' || (github.ref_name == 'main' && github.event_name == 'push'))
uses: ncipollo/release-action@v1
with:
artifacts: ${{ env.ARTIFACT }}.zip