Skip to content

Commit

Permalink
Fix actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mos9527 committed Dec 10, 2024
1 parent f8598cb commit c03dd6e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ on:
branches: main
types: completed
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
default: '0.0.0'

jobs:
build-and-release:
if: "contains(github.event.head_commit.message, 'Version')"
if: "contains(github.event.workflow_run.head_commit.message, 'Version') || github.event.inputs.version"
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -37,13 +42,21 @@ jobs:
run: |
pyinstaller sssekai.spec
- name : Get Version
if : contains(github.event.workflow_run.head_commit.message, 'Version')
id : get_version
run : |
$message = @(git log -1 --oneline --format=%s)
$lines = $message.Split(' ')
$version = $lines[1]
Write-Output "::set-output name=version::$version"
- name : Get Version (manual)
if : github.event.inputs.version
id : get_version_input
run : |
$version = ${{ github.event.inputs.version }}
Write-Output "::set-output name=version::$version"
- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand Down

0 comments on commit c03dd6e

Please sign in to comment.