Skip to content

Commit

Permalink
Fixing PyPi publish
Browse files Browse the repository at this point in the history
  • Loading branch information
tdegeus committed Jun 5, 2023
1 parent 90ed4de commit b298d5b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 26 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Upload Python Package

on:
workflow_dispatch:
release:
types: [created]

jobs:

pypi-publish:

name: Upload release to PyPI

runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/enstat

permissions:
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Checkout latest release tag
run: |
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout $LATEST_TAG
echo "SETUPTOOLS_SCM_PRETEND_VERSION=$LATEST_TAG" >> $GITHUB_ENV
- name: Install deps
run: python -m pip install -U setuptools build wheel

- name: Build
run: python -m build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
26 changes: 0 additions & 26 deletions .github/workflows/pythonpublish.yml

This file was deleted.

0 comments on commit b298d5b

Please sign in to comment.