Skip to content

更新 Workflow

更新 Workflow #7

Workflow file for this run

name: HikariServerLauncher Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
strategy:
matrix:
os: [ubuntu-20.04, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.12.4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build executable(Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: Nuitka/Nuitka-Action@main
with:
nuitka-version: main
script-name: main.py
onefile: true
show-scons: true
mingw64: true
show-memory: true
output-file: "HikariServerLauncher${{ runner.os }}-${{ vars.VERSION }}.exe"
windows-icon-from-ico: HSL.ico
company-name: HikariRevivalProject
product-name: HikariServerLauncher
product-version: ${{ vars.VERSION }}
file-description: HikariServerLauncher
copyright: "Copyright 2024 Hikari"
- name: Build executable(Linux)
if: ${{ matrix.os == 'ubuntu-20.04' }}
uses: Nuitka/Nuitka-Action@main
with:
nuitka-version: main
script-name: main.py
onefile: true
show-scons: true
mingw64: true
show-memory: true
output-file: "HikariServerLauncher${{ runner.os }}-${{ vars.VERSION }}.bin"
company-name: HikariRevivalProject
product-name: HikariServerLauncher
product-version: ${{ vars.VERSION }}
file-description: HikariServerLauncher
copyright: "Copyright 2024 Hikari"
- name: Upload executable
uses: actions/upload-artifact@v3
with:
path: |
build/*.exe
build/*.bin
build/*.app/**/*
- name: Bump version and push tag
id: tag_version
if: ${{ matrix.os == 'ubuntu-20.04' }}
uses: anothrNick/github-tag-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_TAG: "v${{ vars.VERSION }}"
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
files: |
build/*.exe
build/*.bin
build/*.app/**/*
body: |
Release ${{ vars.VERSION }}
Automatically generated release from tag ${{ steps.tag_version.outputs.new_tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}