Skip to content

Commit

Permalink
add github workflow for release
Browse files Browse the repository at this point in the history
  • Loading branch information
LoicGoulefert committed Apr 18, 2022
1 parent e3d6b1a commit 50098ca
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release

on:
push:
tags:
- '*.*.*'

jobs:

job_release:
name: Create Release and Upload to PyPI
runs-on: ubuntu-latest
steps:
- name: Get tag
id: tag
run: |
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Build
id: build
run: |
python setup.py build sdist bdist_wheel
- name: Create Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ steps.tag.outputs.tag }}
prerelease: false
draft: true
files: |
dist/*
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
verbose: true

0 comments on commit 50098ca

Please sign in to comment.