actiion update #13
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 and Release Application | |
on: | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
build-mac: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '22.9.0' | |
- name: Build | |
run: | | |
mkdir -p bin | |
echo "Downloading RMLMapper" | |
curl -L https://github.com/RMLio/rmlmapper-java/releases/download/v7.2.0/rmlmapper-7.2.0-r374-all.jar -o bin/mapper.jar | |
echo "Building frontend" | |
npm run frontend:prod | |
echo "Installing python dependencies" | |
uv sync | |
echo "Building application" | |
uv run nuitka \ | |
--standalone \ | |
--product-version=${{ github.ref_name }} \ | |
--file-version=${{ github.ref_name }} \ | |
--output-dir=dist \ | |
--include-data-dir=public=public \ | |
--include-data-dir=bin=bin \ | |
--macos-create-app-bundle \ | |
--product-name=RDFCraft \ | |
--assume-yes-for-downloads \ | |
--deployment \ | |
main.py | |
# Nuitka will produce dist/main.app. Rename to RDFCraft.app | |
mv dist/main.app dist/RDFCraft.app | |
# Zip the RDFCraft.app so it remains a folder after download | |
- name: Create ZIP from .app | |
run: | | |
cd dist | |
zip -r RDFCraft-mac.zip RDFCraft.app | |
- name: Upload Mac Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: RDFCraft-Mac | |
path: dist/RDFCraft-mac.zip | |
build-win: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '22.9.0' | |
- name: Build | |
run: | | |
mkdir -p bin | |
echo "Downloading RMLMapper" | |
curl -L https://github.com/RMLio/rmlmapper-java/releases/download/v7.2.0/rmlmapper-7.2.0-r374-all.jar -o bin/mapper.jar | |
echo "Building frontend" | |
npm run frontend:prod | |
echo "Installing python dependencies" | |
uv sync | |
echo "Building application" | |
.\.venv\Scripts\python.exe -m nuitka ` | |
--standalone ` | |
--onefile ` | |
--product-version=$env:GITHUB_REF_NAME ` | |
--file-version=$env:GITHUB_REF_NAME ` | |
--output-dir=dist ` | |
--include-data-dir=public=public ` | |
--include-data-dir=bin=bin ` | |
--windows-disable-console ` | |
--product-name=RDFCraft ` | |
--assume-yes-for-downloads ` | |
--deployment ` | |
main.py | |
mv dist/main.exe dist/RDFCraft.exe | |
- name: Upload Windows Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: RDFCraft-Windows | |
path: dist/RDFCraft.exe | |
release: | |
needs: [build-mac, build-win] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: Create Release | |
uses: 'softprops/action-gh-release@v1' | |
with: | |
tag_name: ${{ github.ref_name }} | |
name: ${{ github.ref_name }} | |
draft: false | |
prerelease: false | |
files: | | |
artifacts/RDFCraft-Mac/RDFCraft-mac.zip | |
artifacts/RDFCraft-Windows/RDFCraft.exe | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |