Merge pull request #48 from TailUFPB/feat/minor-front-adjusts #147
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: CI | |
on: | |
push: | |
branches: ["develop"] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
version-bump: | |
name: π’ Version Bump | |
runs-on: ubuntu-latest | |
steps: | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Automated Version Bump | |
uses: phips28/gh-action-bump-version@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
commit-message: 'CI: bumps version to {{version}} [skip ci]' | |
skip-tag: 'true' | |
build-linux: | |
name: ποΈ Build Linux | |
runs-on: ubuntu-latest | |
needs: version-bump | |
steps: | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install dependencies | |
run: npm install | |
- name: π¦ Electron Builder Linux | |
run: npm run electron:package:linux | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload Linux artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: LinguifAI-Linux | |
path: dist/*.AppImage | |
build-windows: | |
name: ποΈ Build Windows | |
runs-on: windows-latest | |
needs: version-bump | |
strategy: | |
fail-fast: false | |
steps: | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: β Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
cache: "npm" | |
- name: Set up conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: default | |
environment-file: api/environment.yml | |
- name: π¨ Setup Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.12.3 | |
- name: Install pip dependencies | |
run: pip install -r api/requirements.txt pyinstaller==6.6.0 | |
- name: Build flask exe | |
run: pyinstaller api/app.spec --hidden-import=tiktoken_ext.openai_public --hidden-import=tiktoken_ext | |
- name: Install dependencies | |
run: npm install | |
- name: π¦ Electron Builder Windows | |
run: npm run electron:package:win | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload Windows artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: LinguifAI-Windows | |
path: dist/*.exe | |
publish-release: | |
name: π Publish Release | |
runs-on: ubuntu-latest | |
needs: [build-linux, build-windows] | |
steps: | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get version of the project | |
id: project-version | |
uses: euberdeveloper/ga-project-version@main | |
- name: Download Linux artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: LinguifAI-Linux | |
path: dist/ | |
- name: Download Windows artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: LinguifAI-Windows | |
path: dist/ | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ steps.project-version.outputs.version }} | |
release_name: v${{ steps.project-version.outputs.version }} | |
draft: false | |
prerelease: true | |
- name: Upload Linux artifact | |
id: upload-linux | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/LinguifAI-${{ steps.project-version.outputs.version }}.AppImage | |
asset_name: LinguifAI-${{ steps.project-version.outputs.version }}.AppImage | |
asset_content_type: application/octet-stream | |
- name: Upload Windows artifact | |
id: upload-windows | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/LinguifAI Setup ${{ steps.project-version.outputs.version }}.exe | |
asset_name: LinguifAI-Setup-${{ steps.project-version.outputs.version }}.exe | |
asset_content_type: application/octet-stream |