Skip to content

Update to use new pyinstaller release approach; add GH release action #1

Update to use new pyinstaller release approach; add GH release action

Update to use new pyinstaller release approach; add GH release action #1

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
artifact_name: [windows, linux, macos]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Build binary
run: pyinstaller --onefile gpt_cmd.py
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: dist/gpt_cmd
release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Rename artifacts
run: |
for os in windows linux macos; do
echo "Moving ${os}/dist/gpt_cmd to gpt_cmd-${os}"
mv "${os}/dist/gpt_cmd" "gpt_cmd-${os}"
rm -rf "${os}/"
done
- name: Create release
uses: ncipollo/release-action@v1.14.0
with:
artifacts: gpt_cmd-linux,gpt_cmd-macos,gpt_cmd-windows
tag: ${{ github.ref }}
name: ${{ github.ref }}