Skip to content

release

release #12

Workflow file for this run

name: release.yml
run-name: release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # Run on semver like tags
jobs:
create-release:
# if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
outputs:
release_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ github.ref_name }}
tag_name: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ github.token }}
build:
# if: ${{ github.ref == 'refs/heads/main' }}
needs: create-release
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Check-out repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: uv sync --all-extras --dev
- name: Build Executable with Nuitka
uses: Nuitka/Nuitka-Action@main
with:
nuitka-version: main
script-name: napytau/main.py
mode: app
- name: Determine Build Artifact
id: artifact-path
run: |
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
echo "artifact=build/main.exe" >> $GITHUB_ENV
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
echo "artifact=build/main.app" >> $GITHUB_ENV
else
echo "artifact=build/main.bin" >> $GITHUB_ENV
fi
shell: bash
- name: Display structure of downloaded files
run: ls -R
- name: Upload Artifacts
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ needs.create-release.outputs.release_url }}
asset_name: ${{ runner.os }} Build
asset_path: ${{ env.artifact }}
asset_content_type: application/octet-stream