summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-10-10 19:55:49 -0400
committerJason R. Coombs <jaraco@jaraco.com>2020-10-10 20:20:27 -0400
commitce34be2f7548dd68f74e5a0fb98f5b796b076900 (patch)
treefd3f65b85d97505097412878fa2e4e998864b1a4
parentea912cf6598bd882a723518eb5cc01f1c8397094 (diff)
downloadpytest-runner-ce34be2f7548dd68f74e5a0fb98f5b796b076900.tar.gz
Cut releases from Github Actions instead of Azure Pipelines. Ref jaraco/skeleton#24.
-rw-r--r--.github/workflows/main.yml22
-rw-r--r--azure-pipelines.yml23
2 files changed, 21 insertions, 24 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index a189798..b3dd81f 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,4 +1,4 @@
-name: Main
+name: Automated Tests
on: [push, pull_request]
@@ -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 }}
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index fdad0e5..6d31899 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -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')