Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: separate auto release and publish to pypi #156

Merged
merged 2 commits into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]

Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish to pypi on Github release

on:
release:
types: [published]

jobs:
pypi-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Prepare repository
# Fetch full git history and tags
run: git fetch --unshallow --tags

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

- name: Install build & twine
run: python -m pip install build twine

- name: Publish to pypi
run: |
python -m build
twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
7 changes: 0 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ jobs:
with:
python-version: 3.7

- name: Install build & twine
run: python -m pip install build twine

- name: Download auto
run: |
auto_download_url="$(curl -fsSL https://api.github.com/repos/intuit/auto/releases/tags/$AUTO_VERSION | jq -r '.assets[] | select(.name == "auto-linux.gz") | .browser_download_url')"
Expand All @@ -43,9 +40,5 @@ jobs:
- name: Create release
run: |
~/auto shipit -vv
python -m build
twine upload dist/*
env:
GH_TOKEN: ${{ secrets.AUTO_USER_TOKEN }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}