Skip to content

Commit

Permalink
Release via GitHub (#6)
Browse files Browse the repository at this point in the history
* Create release.yaml

* move release script

* update setup-python action in tests
  • Loading branch information
dantownsend authored Oct 10, 2022
1 parent 7f2fcb8 commit 72679ec
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release

on:
release:
types:
- created

jobs:
release:
name: "Publish release"
runs-on: "ubuntu-latest"

steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-python@v4"
with:
python-version: 3.10
- name: "Install dependencies"
run: "pip install -r requirements/dev-requirements.txt"
- name: "Publish to PyPI"
run: "./scripts/release.sh"
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -38,7 +38,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion release.sh → scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
rm ./dist/*
rm -rf ./dist/*
python setup.py sdist bdist_wheel
twine upload dist/*

0 comments on commit 72679ec

Please sign in to comment.