Skip to content

Commit ce34be2

Browse files
committed
Cut releases from Github Actions instead of Azure Pipelines. Ref jaraco/skeleton#24.
1 parent ea912cf commit ce34be2

File tree

2 files changed

+21
-24
lines changed

2 files changed

+21
-24
lines changed

.github/workflows/main.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Main
1+
name: Automated Tests
22

33
on: [push, pull_request]
44

@@ -20,3 +20,23 @@ jobs:
2020
python -m pip install tox
2121
- name: Run tests
2222
run: tox
23+
24+
release:
25+
needs: test
26+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- uses: actions/checkout@v2
31+
- name: Setup Python
32+
uses: actions/setup-python@v1
33+
with:
34+
python-version: 3.8
35+
- name: Install tox
36+
run: |
37+
python -m pip install tox
38+
- name: Release
39+
run: tox -e release
40+
env:
41+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

azure-pipelines.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -70,26 +70,3 @@ stages:
7070
testResultsFiles: '**/test-results.xml'
7171
testRunTitle: 'Python $(python.version)'
7272
condition: succeededOrFailed()
73-
74-
- stage: Publish
75-
dependsOn: Test
76-
jobs:
77-
- job: 'Publish'
78-
79-
steps:
80-
- task: UsePythonVersion@0
81-
inputs:
82-
versionSpec: '3.8'
83-
architecture: 'x64'
84-
85-
- script: python -m pip install tox
86-
displayName: 'Install tox'
87-
88-
- script: |
89-
tox -e release
90-
env:
91-
TWINE_PASSWORD: $(PyPI-token)
92-
GITHUB_TOKEN: $(Github-token)
93-
displayName: 'publish to PyPI'
94-
95-
condition: contains(variables['Build.SourceBranch'], 'tags')

0 commit comments

Comments
 (0)