update to remove mac build because I do not have a mac to build on yet
This commit is contained in:
parent
0a66c1d663
commit
c80474f520
@ -1,11 +1,34 @@
|
|||||||
name: Build and Release
|
name: Build and Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
push:
|
||||||
types: [created]
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
create-release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Get version
|
||||||
|
id: get_version
|
||||||
|
run: |
|
||||||
|
VERSION=$(cat version.txt)
|
||||||
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
tag_name: v${{ env.VERSION }}
|
||||||
|
name: Release v${{ env.VERSION }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
|
needs: [create-release]
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@ -33,6 +56,7 @@ jobs:
|
|||||||
path: dist/macropad.exe
|
path: dist/macropad.exe
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
|
needs: [create-release]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@ -52,49 +76,65 @@ jobs:
|
|||||||
- name: Build executable
|
- name: Build executable
|
||||||
run: |
|
run: |
|
||||||
pyinstaller macropad_linux.spec
|
pyinstaller macropad_linux.spec
|
||||||
|
|
||||||
- name: Upload Linux artifact
|
- name: Upload Linux artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: macropad-linux
|
name: macropad-linux
|
||||||
path: dist/macropad
|
path: dist/macropad
|
||||||
|
|
||||||
build-macos:
|
# MacOS build is temporarily disabled
|
||||||
runs-on: macos-latest
|
# Uncomment this section when macOS build environment becomes available
|
||||||
|
#
|
||||||
|
# build-macos:
|
||||||
|
# needs: [create-release]
|
||||||
|
# runs-on: macos-latest
|
||||||
|
# steps:
|
||||||
|
# - name: Checkout code
|
||||||
|
# uses: actions/checkout@v3
|
||||||
|
#
|
||||||
|
# - name: Set up Python
|
||||||
|
# uses: actions/setup-python@v4
|
||||||
|
# with:
|
||||||
|
# python-version: '3.11'
|
||||||
|
#
|
||||||
|
# - name: Install dependencies
|
||||||
|
# run: |
|
||||||
|
# python -m pip install --upgrade pip
|
||||||
|
# pip install pyinstaller
|
||||||
|
# pip install -r requirements.txt
|
||||||
|
#
|
||||||
|
# - name: Build executable
|
||||||
|
# run: |
|
||||||
|
# pyinstaller macropad_macos.spec
|
||||||
|
#
|
||||||
|
# - name: Upload macOS artifact
|
||||||
|
# uses: actions/upload-artifact@v3
|
||||||
|
# with:
|
||||||
|
# name: macropad-macos
|
||||||
|
# path: dist/macropad.app
|
||||||
|
|
||||||
|
attach-to-release:
|
||||||
|
needs: [create-release, build-windows, build-linux]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: '3.11'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install pyinstaller
|
|
||||||
pip install -r requirements.txt
|
|
||||||
|
|
||||||
- name: Build executable
|
|
||||||
run: |
|
|
||||||
pyinstaller macropad_macos.spec
|
|
||||||
- name: Upload macOS artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: macropad-macos
|
|
||||||
path: dist/macropad.app
|
|
||||||
|
|
||||||
attach-to-release:
|
- name: Get version
|
||||||
needs: [build-windows, build-linux, build-macos]
|
id: get_version
|
||||||
runs-on: ubuntu-latest
|
run: |
|
||||||
steps:
|
VERSION=$(cat version.txt)
|
||||||
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
|
|
||||||
- name: Attach executables to release
|
- name: Attach executables to release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
|
tag_name: v${{ env.VERSION }}
|
||||||
files: |
|
files: |
|
||||||
macropad-windows/macropad.exe
|
macropad-windows/macropad.exe
|
||||||
macropad-linux/macropad
|
macropad-linux/macropad
|
||||||
macropad-macos/macropad.app/**/*
|
# macropad-macos/macropad.app/**/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user