Skip to content

feat: use pushed tag instead of increment + other fixes #25

feat: use pushed tag instead of increment + other fixes

feat: use pushed tag instead of increment + other fixes #25

Workflow file for this run

name: Build
on:
push:
tags:
- "*"
jobs:
build-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m pip install pyinstaller
- name: Build for Linux
run: |
pyi-makespec src/main.py --onefile --noconsole
pyinstaller --clean main.spec
ls dist
- name: bottom text
uses: actions/upload-artifact@v3
with:
name: river-linux
path: dist/main
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m pip install pyinstaller
- name: Build for Windows
run: |
pyi-makespec src\main.py --onefile --noconsole
pyinstaller --clean main.spec
- name: Save artifact
uses: actions/upload-artifact@v3
with:
name: river-windows
path: dist/main.exe
release:
runs-on: ubuntu-latest
needs: [build-windows, build-linux]
permissions: write-all
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: river-windows
path: dist
- uses: actions/download-artifact@v3
with:
name: river-linux
path: dist
- name: Create release
id: release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false
- name: Upload WIN
id: upload-release-asset
uses: sekwah41/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_path: 'dist/main.exe'
asset_name: "catalyst5.exe"
asset_content_type: application/zip
upload_url: ${{ steps.release.outputs.upload_url }}
- name: Upload NIX
id: upload-release-asset2
uses: sekwah41/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_path: 'dist/main'
asset_name: "catalyst5"
asset_content_type: application/zip
upload_url: ${{ steps.release.outputs.upload_url }}