Skip to content

Commit

Permalink
Cut releases from Github Actions instead of Azure Pipelines. Ref jara…
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Oct 11, 2020
1 parent ea912cf commit ce34be2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 24 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Main
name: Automated Tests

on: [push, pull_request]

Expand All @@ -20,3 +20,23 @@ jobs:
python -m pip install tox
- name: Run tests
run: tox

release:
needs: test
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install tox
run: |
python -m pip install tox
- name: Release
run: tox -e release
env:
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 0 additions & 23 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,26 +70,3 @@ stages:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()

- stage: Publish
dependsOn: Test
jobs:
- job: 'Publish'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.8'
architecture: 'x64'

- script: python -m pip install tox
displayName: 'Install tox'

- script: |
tox -e release
env:
TWINE_PASSWORD: $(PyPI-token)
GITHUB_TOKEN: $(Github-token)
displayName: 'publish to PyPI'
condition: contains(variables['Build.SourceBranch'], 'tags')

0 comments on commit ce34be2

Please sign in to comment.