Skip to content

Commit

Permalink
Update yml to trig on tag version
Browse files Browse the repository at this point in the history
  • Loading branch information
faytor committed Oct 1, 2024
1 parent ffab924 commit 90b81ca
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build_exe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ name: Create Release

on:
push:
tags:
- 'v*' # This will trigger the workflow on any tag starting with 'v'
branches:
- develop
- main

permissions:
contents: write
Expand Down Expand Up @@ -32,17 +35,19 @@ jobs:
run: pyinstaller --onefile --windowed --icon=icon.ico --name=DBCompare main.py

- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.run_number }}
release_name: Release v${{ github.run_number }}
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false

- name: Upload Release Asset
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 90b81ca

Please sign in to comment.