mirror of
https://github.com/ikunshare/Onekey.git
synced 2026-01-13 00:27:32 +08:00
Merge branch 'main' into main
This commit is contained in:
78
.github/workflows/python-publish.yml
vendored
78
.github/workflows/python-publish.yml
vendored
@@ -1,10 +1,11 @@
|
||||
# This workflow will upload a Python Package using Twine when a release is created
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
|
||||
# 此工作流使用未经 GitHub 认证的操作。
|
||||
# 它们由第三方提供,并受
|
||||
# 单独的服务条款、隐私政策和支持
|
||||
# 文档。
|
||||
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
# GitHub 建议将操作固定到提交 SHA。
|
||||
# 若要获取较新版本,需要更新 SHA。
|
||||
# 还可以引用标记或分支,但该操作可能会更改而不发出警告。
|
||||
|
||||
name: Upload Python Package
|
||||
|
||||
@@ -16,24 +17,51 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
release-build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install build
|
||||
- name: Build package
|
||||
run: python -m build
|
||||
- name: Publish package
|
||||
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Build release distributions
|
||||
run: |
|
||||
# NOTE: put your own distribution build steps here.
|
||||
python -m pip install build
|
||||
python -m pip install requirements.txt
|
||||
python -m build
|
||||
|
||||
- name: Upload distributions
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-dists
|
||||
path: dist/
|
||||
|
||||
pypi-publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs:
|
||||
- release-build
|
||||
|
||||
permissions:
|
||||
# IMPORTANT: this permission is mandatory for trusted publishing
|
||||
id-token: write
|
||||
|
||||
# Dedicated environments with protections for publishing are strongly recommended.
|
||||
environment:
|
||||
name: pypi
|
||||
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
|
||||
url: https://pypi.org/p/Onekey
|
||||
|
||||
steps:
|
||||
- name: Retrieve release distributions
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: release-dists
|
||||
path: dist/
|
||||
|
||||
- name: Publish release distributions to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
|
||||
@@ -16,4 +16,4 @@ def init():
|
||||
log.info('版本:1.2.2')
|
||||
log.info('项目仓库:https://github.com/ikunshare/Onekey')
|
||||
log.info('官网:ikunshare.com')
|
||||
log.warning('本项目完全开源免费,如果你在淘宝,QQ群内通过购买方式获得,赶紧回去骂商家死全家\n交流群组:\nhttps://qm.qq.com/q/d7sWovfAGI\nhttps://t.me/ikunshare_group')
|
||||
log.warning('本项目完全开源免费,如果你在淘宝,QQ群内通过购买方式获得,赶紧回去骂商家死全家\n交流群组:\nhttps://qm.qq.com/q/d7sWovfAGI\nhttps://t.me/ikunshare_group')
|
||||
|
||||
@@ -6,7 +6,7 @@ async def get(sha, path, repo, session):
|
||||
url_list = [
|
||||
f'https://cdn.jsdmirror.com/gh/{repo}@{sha}/{path}',
|
||||
f'https://jsd.onmicrosoft.cn/gh/{repo}@{sha}/{path}',
|
||||
f'https://mirror.ghproxy.com/https://raw.githubusercontent.com/{repo}/{sha}/{path}',
|
||||
# f'https://mirror.ghproxy.com/https://raw.githubusercontent.com/{repo}/{sha}/{path}',
|
||||
f'https://raw.githubusercontent.com/{repo}/{sha}/{path}',
|
||||
]
|
||||
retry = 3
|
||||
|
||||
Reference in New Issue
Block a user