Initial commit #38
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: Build sb binary | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'sb.py' | |
- 'requirements.txt' | |
tags: | |
- '*' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: self-hosted | |
steps: | |
- name: Check-out repository | |
uses: actions/checkout@v4 | |
- name: Setup venv | |
run: python3.10 -m venv venv | |
- name: Install Dependencies | |
run: ./venv/bin/pip install -r requirements.txt | |
- name: List Pip modules | |
run: ./venv/bin/pip list | |
- name: Compile binary | |
run: | | |
echo "Building with version ${GITHUB_REF#refs/tags/}" | |
export APP_VERSION=${GITHUB_REF#refs/tags/} | |
./venv/bin/python -m nuitka sb.py --onefile -o sb && chmod +x sb | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
sb | |
- name: Run release workflow | |
if: startsWith(github.ref, 'refs/tags/') | |
run: gh workflow run release.yml -f release_tag=${{ github.ref }} | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- uses: sarisia/actions-status-discord@v1 | |
if: always() | |
with: | |
webhook: ${{ secrets.DISCORD_WEBHOOK }} |