Skip to content

Commit

Permalink
Build and publish via github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jspc committed Dec 1, 2021
1 parent eba2bba commit f5c17e4
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: main

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Build on python ${{ matrix.node-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- run: |
pip install nose2
nose2
publish:
if: contains(github.ref, 'refs/tags')
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8

- name: configure
run: |
pip install install --upgrade build
VERSION=$GITHUB_REF_NAME python -m build
- name: publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

0 comments on commit f5c17e4

Please sign in to comment.