Update release.yml
This commit is contained in:
1 parent
d55accd23a
commit
33735dd87a
1 file changed
+25
-35
@@ -3,7 +3,7 @@ name: Package Application with Pyinstaller and Create Release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release_version:
|
||||
@@ -11,49 +11,39 @@ on:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Package Application
|
||||
uses: JackMcKew/pyinstaller-action-linux@main
|
||||
with:
|
||||
path: .
|
||||
spec: patcher.spec
|
||||
|
||||
- name: Prepare artifact
|
||||
run: mv dist/patcher dist/trials_patcher
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: trials_patcher
|
||||
path: dist/trials_patcher
|
||||
|
||||
release:
|
||||
needs: build
|
||||
build-and-release:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v4
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
name: trials_patcher
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Make executable
|
||||
run: chmod +x trials_patcher
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install pyinstaller
|
||||
|
||||
- name: Create and publish release
|
||||
- name: Build with PyInstaller
|
||||
run: pyinstaller patcher.spec
|
||||
|
||||
- name: Prepare artifact for release
|
||||
run: mv dist/patcher dist/trials_patcher-linux
|
||||
|
||||
- name: Create and Publish Release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: "trials_patcher"
|
||||
|
||||
artifacts: "dist/trials_patcher-linux"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: ${{ github.event.inputs.release_version || github.ref_name }}
|
||||
name: ${{ github.event.inputs.release_version || github.ref_name }}
|
||||
|
||||
tag: ${{ github.event.inputs.release_version || github.ref }}
|
||||
releaseName: Release ${{ github.event.inputs.release_version || github.ref }}
|
||||
Reference in new issue
Block a user