Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 90f9873cad | |||
| e598e8f1ed | |||
| 6d371c13d7 |
4 changed files with 21 additions and 2 deletions
12
.woodpecker/publish.yaml
Normal file
12
.woodpecker/publish.yaml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
when:
|
||||||
|
- event: tag
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: publish package
|
||||||
|
image: ghcr.io/astral-sh/uv:python3.11-alpine
|
||||||
|
commands:
|
||||||
|
- uv build
|
||||||
|
- uv publish --index forgejo
|
||||||
|
environment:
|
||||||
|
UV_PUBLISH_TOKEN:
|
||||||
|
from_secret: publish_token
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
|
- event: manual
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: python tests
|
- name: python tests
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,12 @@ sentry-enabled = ["sentry_sdk>=0.19.5"]
|
||||||
[tool.setuptools.packages]
|
[tool.setuptools.packages]
|
||||||
find = {include = ["transip_client"]}
|
find = {include = ["transip_client"]}
|
||||||
|
|
||||||
|
[[tool.uv.index]]
|
||||||
|
name = "forgejo"
|
||||||
|
url = "https://forgejo.fudiggity.nl/sonny/transip-client/packages"
|
||||||
|
publish-url = "https://forgejo.fudiggity.nl/api/packages/sonny/pypi"
|
||||||
|
explicit = true
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
transip-update = "transip_client.cli:update"
|
transip-update = "transip_client.cli:update"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import base64
|
import base64
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import time
|
|
||||||
|
|
||||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||||
|
from secrets import token_urlsafe
|
||||||
from typing import Generator
|
from typing import Generator
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
@ -28,7 +28,7 @@ def _get_token(private_key_path: str, login: str, api_url: str) -> str:
|
||||||
f"{api_url}/auth",
|
f"{api_url}/auth",
|
||||||
json={
|
json={
|
||||||
"login": login,
|
"login": login,
|
||||||
"nonce": str(int(time.time() * 1000)),
|
"nonce": token_urlsafe(),
|
||||||
"read_only": False,
|
"read_only": False,
|
||||||
"expiration_time": "30 minutes",
|
"expiration_time": "30 minutes",
|
||||||
"label": "Trans IP client",
|
"label": "Trans IP client",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue