ci: trigger release workflow ony tag_created

This commit is contained in:
Eugen Eisler 2024-10-04 01:16:26 +02:00
parent 3253cd284a
commit 87d2acbb43

View File

@ -90,21 +90,18 @@ jobs:
path: fabric-windows-${{ matrix.arch }}.exe
- name: Create release if it doesn't exist
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release view ${{ github.ref_name }} || gh release create ${{ github.ref_name }} --title "Release ${{ github.ref_name }}" --notes "Automated release for ${{ github.ref_name }}"
- name: Upload release artifact
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && matrix.os == 'windows-latest'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.ref_name }} fabric-windows-${{ matrix.arch }}.exe
- name: Upload release artifact
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && matrix.os != 'windows-latest'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |