mirror of
https://github.com/ikunshare/Onekey.git
synced 2026-01-13 00:27:32 +08:00
67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
name: Build CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
permissions:
|
|
contents: write
|
|
runs-on: windows-2019
|
|
steps:
|
|
- name: Check out git repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get package version
|
|
shell: powershell
|
|
run: |
|
|
$version = (Get-Content package.json | ConvertFrom-Json).version
|
|
echo "PACKAGE_VERSION=$version" >> $env:GITHUB_ENV
|
|
|
|
- name: Set up Python 3.12
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: 3.12
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install imageio
|
|
pip install -r requirements.txt
|
|
|
|
- name: Build
|
|
uses: Nuitka/Nuitka-Action@main
|
|
with:
|
|
nuitka-version: main
|
|
script-name: main.py
|
|
standalone: true
|
|
onefile: true
|
|
show-memory: true
|
|
windows-uac-admin: true
|
|
windows-icon-from-ico: icon.jpg
|
|
company-name: ikunshare
|
|
product-name: Onekey
|
|
file-version: 0.0.0.0
|
|
product-version: 0.0.0.0
|
|
file-description: Onekey_Beta_${{ github.sha }}
|
|
copyright: Copyright © 2024 ikun0014
|
|
output-file: Onekey_${{ github.sha }}.exe
|
|
assume-yes-for-downloads: true
|
|
output-dir: build
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Onekey_${{ github.sha }}.exe
|
|
path: build/Onekey_${{ github.sha }}.exe
|
|
|
|
- name: Upload to Telegram Channel
|
|
run: |
|
|
& curl -F "chat_id=${{ secrets.TELEGRAM_TO }}" `
|
|
-F "document=@build/Onekey_${{ github.sha }}.exe" `
|
|
-F "caption=Onekey's New CI Build ${{ github.sha }}" `
|
|
-F "parse_mode=Markdown" `
|
|
"https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendDocument"
|