Add nuitka build to release workflow #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build_binary: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-20.04, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
architecture: 'x64' | |
cache: 'pip' | |
cache-dependency-path: | | |
pyproject.toml | |
- name: Install main | |
run: | | |
pip install . | |
- name: Build Executable | |
uses: Nuitka/Nuitka-Action@main | |
with: | |
nuitka-version: main | |
script-name: osam | |
onefile: true | |
- name: Test Executable | |
run: | | |
./build/osam.bin --version | |
- name: Rename Executable | |
run: | | |
mv build/osam.bin build/osam-${{ runner.os }}.bin | |
if: matrix.os != 'windows-latest' | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-${{ runner.os }} | |
path: | | |
build/*.exe | |
build/*.bin | |
release: | |
needs: build_binary | |
runs-on: ubuntu-latest | |
steps: | |
- name: Build Changelog | |
id: github_release | |
uses: mikepenz/release-changelog-builder-action@v3 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
configurationJson: | | |
{ | |
"template": "#{{CHANGELOG}}\n\n<details>\n<summary>Uncategorized</summary>\n\n#{{UNCATEGORIZED}}\n</details>\n\n---\n\n- For my daily development update, check [my Twitter/X](https://twitter.com/wkentaro_).\n- If you'd like to support this project, check [my sponsoring page](https://github.com/sponsors/wkentaro).", | |
"pr_template": "- #{{TITLE}} ##{{NUMBER}}", | |
"categories": [ | |
{ | |
"title": "## 🚀 Features", | |
"labels": ["feature"] | |
}, | |
{ | |
"title": "## ✨ Enhancement", | |
"labels": ["enhancement"] | |
}, | |
{ | |
"title": "## 🐛 Fixes", | |
"labels": ["fix"] | |
}, | |
{ | |
"title": "## 💬 Other", | |
"labels": ["other"] | |
} | |
] | |
} | |
- name: Create Release | |
uses: mikepenz/[email protected] | |
with: | |
body: ${{steps.github_release.outputs.changelog}} | |
draft: true |