mirror of
https://github.com/leminlimez/Nugget.git
synced 2025-04-08 04:23:05 +08:00
Create build.yml
This commit is contained in:
99
.github/workflows/build.yml
vendored
Normal file
99
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
name: Build Nugget
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release_version:
|
||||
description: 'Which version is this release?'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build-macos-intel:
|
||||
runs-on: macos-13
|
||||
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: |
|
||||
python3 -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Build MacOS (Intel)
|
||||
run: python3 compile.py
|
||||
|
||||
- name: Zip Nugget.app (Intel)
|
||||
run: |
|
||||
cd dist
|
||||
zip -r "Nugget_macOS_intel.zip" Nugget.app
|
||||
|
||||
build-macos-arm:
|
||||
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: |
|
||||
python3 -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Build MacOS (ARM)
|
||||
run: python3 compile.py
|
||||
|
||||
- name: Zip Nugget.app (ARM)
|
||||
run: |
|
||||
cd dist
|
||||
zip -r "Nugget_macOS_arm.zip" Nugget.app
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-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 -r requirements.txt
|
||||
|
||||
- name: Build Windows
|
||||
run: python compile.py
|
||||
|
||||
- name: Zip Nugget
|
||||
run: |
|
||||
cd dist
|
||||
Compress-Archive -Path Nugget -DestinationPath "Nugget_Windows.zip"
|
||||
|
||||
create-release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-macos-intel, build-macos-arm, build-windows]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Create Release
|
||||
uses: marvinpinto/action-automatic-releases@latest
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
prerelease: false
|
||||
automatic_release_tag: ${{ github.event.inputs.release_version }}
|
||||
files: |
|
||||
dist/Nugget_macOS_intel.zip
|
||||
dist/Nugget_macOS_arm.zip
|
||||
dist/Nugget_Windows.zip
|
||||
Reference in New Issue
Block a user