Skip to content

Commit

Permalink
fixxing releases
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpastor97 committed Jun 1, 2022
1 parent 125adcb commit 76dc3eb
Showing 1 changed file with 25 additions and 35 deletions.
60 changes: 25 additions & 35 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,31 @@
name: Build distribution
# 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: Upload Python Package

on:
# GitHub has started calling new repo's first branch "main" https://github.com/github/renaming
# Existing codes likely still have "master" as the primary branch
# Both are tracked here to keep legacy and new codes working
push:
branches:
- "demo"
schedule:
# Nightly tests run on master by default:
# Scheduled workflows run on the latest commit on the default or base branch.
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
- cron: "0 0 * * 1" ## running every Monday at midnight
release:
types: [published]

jobs:
test:
runs-on: "ubuntu-latest"

steps:
- name: Checkout source
uses: actions/checkout@v2
deploy:

- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
runs-on: ubuntu-latest

- name: Install build dependencies
run: python -m pip install build wheel

- name: Build distributions
shell: bash -l {0}
run: python setup.py sdist bdist_wheel

- name: Publish package to PyPI
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') #github.repository == 'ProLint/ufcc' &&
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*

0 comments on commit 76dc3eb

Please sign in to comment.