41 lines
1.0 KiB
YAML
41 lines
1.0 KiB
YAML
name: Build server
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
token: '${{ secrets.TOKEN_PULL }}'
|
|
- name: Set up Python 3.10
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.10"
|
|
- name: "Build app"
|
|
run: "python3 build.py"
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
# Upload built files
|
|
name: 'TeleSec-dist'
|
|
path: ./dist
|
|
- name: "mkdir"
|
|
run: "mkdir -p _artifact"
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: 'TeleSec-dist'
|
|
path: _artifact
|
|
- name: "List _artifact"
|
|
run: "ls -la _artifact"
|
|
- name: Upload as release
|
|
uses: https://gitea.com/actions/release-action@main
|
|
with:
|
|
files: |-
|
|
_artifact/**
|
|
api_key: '${{secrets.TOKEN_PUSH_PLUS}}' |