Skip to content

Update deprecated action versions. #7

Update deprecated action versions.

Update deprecated action versions. #7

Workflow file for this run

name: Upload Package to PyPI and TestPyPI
on:
push:
branches: [ master ]
tags:
- '*'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Setup System Dependencies
run: |
sudo apt update
sudo apt install libkrb5-dev -y
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dist-requirements.txt
- name: Create Environment Variable For Test PyPI Builds
if: startsWith(github.ref, 'refs/tags/') != true
shell: bash
run: |
echo 'SCM_NO_LOCAL_SCHEME=true' >> $GITHUB_ENV
- name: Check environment variable
run: echo "${{ env.SCM_NO_LOCAL_SCHEME}}"
- name: Build package
run: python -m build
- name: Publish to Test PyPI
if: startsWith(github.ref, 'refs/tags/') != true
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}