52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
|
|
pypi:
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: pypi
|
|
url: https://pypi.org/p/gotify-tray
|
|
permissions:
|
|
id-token: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.13'
|
|
- name: Upgrade pip and enable wheel support
|
|
run: python -m pip install --upgrade pip setuptools wheel
|
|
- name: install requirements
|
|
run: |
|
|
pip install -r requirements.txt
|
|
pip install build
|
|
- name: create pip package
|
|
run: python -m build
|
|
- name: upload to pypi
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: gotify_tray-${{github.ref_name}}-py3-none-any.whl
|
|
path: dist/gotify_tray-${{github.ref_name}}-py3-none-any.whl
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
needs: [pypi]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/download-artifact@v4
|
|
- name: Release
|
|
uses: marvinpinto/action-automatic-releases@latest
|
|
with:
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
prerelease: false
|
|
files: |
|
|
gotify_tray-${{github.ref_name}}-py3-none-any.whl
|