1
- name : Build python-jamf and publish to PyPI
1
+ name : Build and publish python-jamf to Github and PyPI
2
2
on :
3
- release :
4
- types : [ published ]
5
- strategy :
6
- matrix :
7
- os : [ubuntu-latest, macos-10.15, macos-11]
8
- python-version : [ '3.7', '3.8', '3.9', 'pypy-3.7' ]
3
+ push :
4
+ tags :
5
+ - ' *'
9
6
jobs :
10
7
build :
11
- name : Build on ${{ matrix.os }} using ${{ matrix.python-version }}
12
- runs-on : ${{ matrix.os }}
8
+ name : Build
9
+ runs-on : ubuntu-latest
13
10
steps :
14
11
- name : Checkout sources
15
12
uses : actions/checkout@v2
40
37
python-version : 3.7
41
38
- name : Build binary wheel and a source tarball
42
39
run : python setup.py sdist
43
- - name : Publish distribution to Test PyPI
40
+ - name : Publish to PyPI
44
41
uses : pypa/gh-action-pypi-publish@master
45
42
with :
46
- password : ${{ secrets.test_pypi_password }}
47
- repository_url : https://test.pypi.org/legacy/
43
+ password : ${{ secrets.TEST_PYPI_PASSWORD }}
44
+ repository_url : https://test.pypi.org/legacy/
45
+ - name : Create GitHub Release
46
+ uses : actions/create-release@v1
47
+ id : create_release
48
+ env :
49
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
50
+ with :
51
+ tag_name : ${{ github.ref }}
52
+ release_name : ${{ github.ref }}
53
+ draft : true
54
+ prerelease : false
55
+ - name : Publish to GitHub
56
+ uses : xresloader/upload-to-github-release@v1
57
+ env :
58
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
59
+ with :
60
+ file : " dist/*"
61
+ release_id : ${{ steps.create_release.outputs.id }}
0 commit comments