2024-07-25 13:30:21 -05:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on: push
|
2024-07-17 02:36:15 -05:00
|
|
|
|
|
|
|
jobs:
|
2024-07-25 13:30:21 -05:00
|
|
|
build-linux-binary:
|
|
|
|
runs-on: ubuntu-latest
|
2024-07-17 02:36:15 -05:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
|
|
with:
|
|
|
|
python-version: '3.12.4'
|
|
|
|
cache: 'pip' # caching pip dependencies
|
2024-07-17 14:10:55 -05:00
|
|
|
- run: apt-get update
|
2024-07-17 14:12:41 -05:00
|
|
|
- run: apt-get install unixodbc -y
|
2024-07-17 13:14:56 -05:00
|
|
|
- run: pip install -r requirements.txt
|
2024-07-17 13:29:49 -05:00
|
|
|
- run: pyinstaller --noconfirm --onefile --console ${{ gitea.workspace }}/inex.py
|
2024-07-25 13:30:21 -05:00
|
|
|
- uses: softprops/action-gh-release@v2
|
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v2
|
2024-07-25 16:09:09 -05:00
|
|
|
if: startsWith(gitea.ref, 'refs/tags/')
|
2024-07-17 13:14:56 -05:00
|
|
|
with:
|
2024-07-25 13:30:21 -05:00
|
|
|
files: ${{ gitea.workspace }}/dist/inex
|
|
|
|
build-windows-binary:
|
|
|
|
runs-on: windows
|
2024-07-25 16:09:09 -05:00
|
|
|
permissions:
|
|
|
|
contents: write # release changes require contents write
|
|
|
|
|
2024-07-25 13:30:21 -05:00
|
|
|
steps:
|
2024-07-25 16:09:09 -05:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Upload Release Asset
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
|
|
run: pip install -r requirements.txt
|
|
|
|
run: pyinstaller --noconfirm --onefile --console ${{ gitea.workspace }}/inex.py
|
|
|
|
run: gh release upload <release_tag> <a_file>
|
2024-07-25 13:30:21 -05:00
|
|
|
|