Skip to content

Commit

Permalink
Merge pull request #65 from ESSS/fb-fix-release-job
Browse files Browse the repository at this point in the history
Add deploy job to publish new version of the lib
  • Loading branch information
lvoliveira authored Mar 22, 2023
2 parents c2a35cc + 30b9b9b commit 4205782
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
36 changes: 35 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: build

on: [push]
on:
push:
branches:
- master
- rb-*
tags:
- v*

pull_request:

jobs:
build:
Expand Down Expand Up @@ -28,4 +36,30 @@ jobs:
- name: Upload codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true

deploy:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'ESSS/flask-restalchemy'

runs-on: ubuntu-20.04

needs: build

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.6"

- name: Build Package
run: |
python -m pip install --upgrade pip wheel setuptools
python setup.py sdist bdist_wheel
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_token }}
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[metadata]
long_description = file: README.md
long_description_content_type= text/markdown

[bdist_wheel]
python_tag = py3

Expand Down

0 comments on commit 4205782

Please sign in to comment.