6 Commits

Author SHA1 Message Date
e677309631 only retry on failure
Some checks failed
Python package / lint (push) Successful in 7s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Successful in 9s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Has been skipped
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to TestPyPI (push) Failing after 2s
2024-09-14 17:35:46 -06:00
69505e8371 disable signing
Some checks failed
Python package / lint (push) Successful in 7s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Successful in 9s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Has been skipped
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to TestPyPI (push) Failing after 2s
2024-09-14 17:32:39 -06:00
a5b7c0220b allow earlier python versions
Some checks failed
Python package / lint (push) Successful in 6s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Successful in 8s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Successful in 5s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to TestPyPI (push) Successful in 4s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Sign the Python 🐍 distribution 📦 with Sigstore and upload them to GitHub Release (push) Failing after 13s
2024-09-14 17:31:23 -06:00
1c1eaa71de ignore _version.py
Some checks failed
Python package / lint (push) Successful in 6s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Successful in 8s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Successful in 5s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Sign the Python 🐍 distribution 📦 with Sigstore and upload them to GitHub Release (push) Failing after 17s
Publish Python 🐍 distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to TestPyPI (push) Successful in 4s
2024-09-14 17:21:21 -06:00
30f0d0a576 improve template _version.py 2024-09-14 17:20:14 -06:00
e2e19876cc fix pypi token 2024-09-14 17:16:19 -06:00
5 changed files with 56 additions and 49 deletions

View File

@ -56,53 +56,55 @@ jobs:
path: dist/ path: dist/
- name: Publish distribution 📦 to PyPI - name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1 uses: pypa/gh-action-pypi-publish@release/v1
github-release:
name: >-
Sign the Python 🐍 distribution 📦 with Sigstore
and upload them to GitHub Release
needs:
- publish-to-pypi
runs-on: ubuntu-latest
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore
env:
RUNNER_TOOL_CACHE: /toolcache # https://about.gitea.com/resources/tutorials/enable-gitea-actions-cache-to-accelerate-cicd
AGENT_TOOLSDIRECTORY: /toolcache # https://github.com/actions/setup-python/issues/824
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with: with:
name: python-package-distributions password: ${{ secrets.PYPI_API_TOKEN }}
path: dist/
- name: Sign the dists with Sigstore # github-release:
uses: sigstore/gh-action-sigstore-python@v2.1.1 # name: >-
with: # Sign the Python 🐍 distribution 📦 with Sigstore
inputs: >- # and upload them to GitHub Release
./dist/*.tar.gz # needs:
./dist/*.whl # - publish-to-pypi
- name: Create GitHub Release # runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ github.token }} # permissions:
run: >- # contents: write # IMPORTANT: mandatory for making GitHub Releases
gh release create # id-token: write # IMPORTANT: mandatory for sigstore
'${{ github.ref_name }}'
--repo '${{ github.repository }}' # env:
--notes "" # RUNNER_TOOL_CACHE: /toolcache # https://about.gitea.com/resources/tutorials/enable-gitea-actions-cache-to-accelerate-cicd
- name: Upload artifact signatures to GitHub Release # AGENT_TOOLSDIRECTORY: /toolcache # https://github.com/actions/setup-python/issues/824
env:
GITHUB_TOKEN: ${{ github.token }} # steps:
# Upload to GitHub Release using the `gh` CLI. # - name: Download all the dists
# `dist/` contains the built packages, and the # uses: actions/download-artifact@v3
# sigstore-produced signatures and certificates. # with:
run: >- # name: python-package-distributions
gh release upload # path: dist/
'${{ github.ref_name }}' dist/** # - name: Sign the dists with Sigstore
--repo '${{ github.repository }}' # uses: sigstore/gh-action-sigstore-python@v2.1.1
# with:
# inputs: >-
# ./dist/*.tar.gz
# ./dist/*.whl
# - name: Create GitHub Release
# env:
# GITHUB_TOKEN: ${{ github.token }}
# run: >-
# gh release create
# '${{ github.ref_name }}'
# --repo '${{ github.repository }}'
# --notes ""
# - name: Upload artifact signatures to GitHub Release
# env:
# GITHUB_TOKEN: ${{ github.token }}
# # Upload to GitHub Release using the `gh` CLI.
# # `dist/` contains the built packages, and the
# # sigstore-produced signatures and certificates.
# run: >-
# gh release upload
# '${{ github.ref_name }}' dist/**
# --repo '${{ github.repository }}'
publish-to-testpypi: publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI name: Publish Python 🐍 distribution 📦 to TestPyPI

4
.gitignore vendored
View File

@ -159,4 +159,6 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear # and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder. # option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/ #.idea/
**/_version.py

View File

@ -1 +0,0 @@
__version__ = "editable"

View File

@ -96,6 +96,10 @@ def wrap(command: List[str], config: Path, retries: int, version):
with gotify.Gotify(base_url=url, app_token=app_token) as gotify_connection: with gotify.Gotify(base_url=url, app_token=app_token) as gotify_connection:
gotify_connection.create_message(message=message, title=title) gotify_connection.create_message(message=message, title=title)
if not result.returncode:
# only retry on failure
break
sys.exit(result.returncode) sys.exit(result.returncode)

View File

@ -7,7 +7,7 @@ name = "goat_monitor"
authors = [{ name = "Brendan Haines", email = "brendan.haines@gmail.com" }] authors = [{ name = "Brendan Haines", email = "brendan.haines@gmail.com" }]
description = "Remote monitoring of anything" description = "Remote monitoring of anything"
readme = "README.md" readme = "README.md"
requires-python = ">=3.11" # might work with earlier versions, I haven't tried requires-python = ">=3"
# keywords = ["one", "two"] # keywords = ["one", "two"]
license = { text = "MIT License" } license = { text = "MIT License" }
classifiers = ["Programming Language :: Python :: 3"] classifiers = ["Programming Language :: Python :: 3"]