Skip to content

Merge branch 'master' of https://github.com/openUC2/ImSwitch #23

Merge branch 'master' of https://github.com/openUC2/ImSwitch

Merge branch 'master' of https://github.com/openUC2/ImSwitch #23

Workflow file for this run

name: imswitch-pypi
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build-n-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Find latest tag of dependency
id: remote_chart
uses: oprypin/find-latest-tag@v1
with:
repository: openUC2/UC2-REST
releases-only: true
- name: bump version
uses: jacobtomlinson/gha-find-replace@v2
with:
find: '__version__ = "v0.0.0"'
replace: '__version__ = "${{ steps.remote_chart.outputs.tag }}"'
regex: false
- name: Install pypa/build
run: |
python3 -m pip install build --user
- name: Build a binary wheel and a source tarball
run: |
python3 -m build --sdist --wheel --outdir dist/ .
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}