Skip to content

Merge pull request #57 from homeylab/change_back_off_retry_behavior #8

Merge pull request #57 from homeylab/change_back_off_retry_behavior

Merge pull request #57 from homeylab/change_back_off_retry_behavior #8

Workflow file for this run

---
name: Create Official Release and Push Artifacts
on:
push:
tags:
- v*
permissions:
contents: write
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Tests
uses: ./.github/actions/tests
create_release:
runs-on: ubuntu-latest
needs: tests
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref_name }}
generateReleaseNotes: true
# build and push docker image
release-docker:
runs-on: ubuntu-latest
needs:
- tests
- create_release
environment: 'Dockerhub'
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run Docker Build
uses: ./.github/actions/docker
with:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
release-python:
runs-on: ubuntu-latest
needs:
- tests
- create_release
timeout-minutes: 20
environment: 'PyPi'
steps:
- name: Get tag release without v
shell: bash
run: |
TAG=${{ github.ref_name }}
echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
echo "Tag without v is: ${VERSION}"
- name: Update Release Tag
shell: bash
run: sed -i "s/^version = [^ ]*/version = ${{ env.VERSION }}/" setup.cfg
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.13.2'
- name: Install Dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install build
- name: Build Python Package
shell: bash
run: |
python -m pip install --upgrade build
python -m build
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
skip-existing: true
# - name: Checkout
# uses: actions/checkout@v4
# - name: Deploy release to PyPi
# uses: ./.github/actions/python
# with:
# pypi_api_token: "${{ secrets.PYPI_API_TOKEN }}"