Skip to content

2.2.53

2.2.53 #104

Workflow file for this run

# 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
# 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.
name: Upload Python Package
on:
release:
types: [published]
jobs:
tag_version:
runs-on: ubuntu-latest
outputs:
sem_ver: ${{ steps.ver_tag.outputs.new_tag }}
name: Bump version
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Bump version and push tag
id: ver_tag
uses: anothrNick/github-tag-action@1.55.0 # Don't use @master unless you're happy to test the latest version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: false
DEFAULT_BUMP: patch
TAG_CONTEXT: branch
INITIAL_VERSION: '1.0.0'
VERBOSE: false
- name: test
run: echo "${{ steps.ver_tag.outputs.new_tag }}"
build:
needs: [tag_version]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
echo "${{ needs.tag_version.outputs.sem_ver }}"
echo -e '__version__ = "${{ needs.tag_version.outputs.sem_ver }}"\n' > warp_beacon/__version__.py
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- uses: actions/upload-artifact@v3
with:
path: dist/*
publish:
needs: [tag_version, build]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}