Skip to content

Commit

Permalink
Merge pull request #3 from appsembler/pypi
Browse files Browse the repository at this point in the history
Publish to pypi on tagging a release
  • Loading branch information
OmarIthawi authored Mar 7, 2022
2 parents b66af03 + 97619d5 commit 76a5993
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Python packaging for pip

on:
pull_request:
release:
types: [published]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package for GitHub releases
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
if: ${{ startsWith(github.ref, 'refs/tags') }}
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def package_data(pkg, roots):

setup(
name='xblock-grade-fetcher',
version='0.1',
version='0.2',
description='Grade Fetcher',
license='AGPL v3',
packages=[
Expand Down

0 comments on commit 76a5993

Please sign in to comment.