Skip to content

Commit

Permalink
fix(cicd): Insert flit based release (#26)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Butler <[email protected]>
  • Loading branch information
butler54 authored Nov 7, 2023
1 parent 99e20aa commit bacddb9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 21 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/flit-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CD

on:
push:
tags:
- v*

jobs:
publish:
name: Publish to PyPi
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install flit
run: |
pip install flit>=3.9.0
- name: Build and publish
run: |
flit publish
env:
FLIT_USERNAME: __token__
FLIT_PASSWORD: ${{ secrets.PYPI_KEY }}
22 changes: 1 addition & 21 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.11

- name: Installation (deps and package)
run: |
Expand Down Expand Up @@ -100,23 +100,3 @@ jobs:
git config --global user.name "semantic-release (via Github actions)"
git config --global user.email "semantic-release@github-actions"
semantic-release -vv publish
# publish:
# name: Publish to PyPi
# if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout source
# uses: actions/checkout@v3
# - name: Set up Python 3.9
# uses: actions/setup-python@v1
# with:
# python-version: 3.9
# - name: install flit
# run: |
# pip install flit~=3.0
# - name: Build and publish
# run: |
# flit publish
# env:
# FLIT_USERNAME: __token__
# FLIT_PASSWORD: ${{ secrets.PYPI_KEY }}

0 comments on commit bacddb9

Please sign in to comment.