workflow
This commit is contained in:
commit
57d87bd982
49
.github/workflows/main.yml
vendored
Normal file
49
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
name: Python application
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, master ]
|
||||
pull_request:
|
||||
branches: [ main, master ]
|
||||
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [ '3.12.2' ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
path: ~/.cache
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: 'pip'
|
||||
env:
|
||||
CI: true
|
||||
AGENT_TOOLSDIRECTORY: /opt/gitea-runner/_work/_tool
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
- name: get pyinstaller
|
||||
run: |
|
||||
pip install pyinstaller
|
||||
- name: build
|
||||
run: |
|
||||
pyinstaller --onefile main.py
|
||||
- name: publish to release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: dist/main
|
||||
tag_name: ${{ github.sha }}
|
||||
release_name: ${{ github.sha }}
|
||||
body: ${{ github.sha }}
|
||||
draft: false
|
||||
prerelease: false
|
Loading…
Reference in New Issue
Block a user