summaryrefslogtreecommitdiff
path: root/.github/workflows/release-with-executable.yml
blob: 18233cfb74ed97e192741600d686b0f5cd0f4af8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Build and Release

on:
  release:
    types: [created]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: '3.9'
    
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
        pip install pyinstaller
        apt-get install binutils

    - name: Build with PyInstaller
      run: |
        pyinstaller krr.py
        zip -r  ./dist/krr

    - name: Upload Release Asset
      uses: actions/upload-release-asset@v1.0.2
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        upload_url: ${{ github.event.release.upload_url }} 
        asset_path: .
        asset_name: "krr-linux-${{ github.ref }}.zip"
        asset_content_type: application/octet-stream