11on :
22 push :
3- # Sequence of patterns matched against refs/tags
43 tags :
5- - ' v*' # Push events to matching v*, i.e. v1.0, v20.15.10
4+ - ' v*'
65
76name : Create Release
87
98jobs :
109 build :
11- name : Create Release
12- runs-on : windows-latest
13- steps :
14- - name : Get version from tag
15- id : tag_name
16- run : |
17- echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
18- shell : bash
19-
20- - name : Checkout code
21- uses : actions/checkout@v2
22-
23- - name : Get Changelog Entry
24- id : changelog_reader
25- uses : mindsers/changelog-reader-action@v2
26- with :
27- version : ${{ steps.tag_name.outputs.current_version }}
28- path : ./CHANGELOG.md
29-
30- - name : Create Release
31- id : create_release
32- uses : actions/create-release@v1
33- env :
34- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35- with :
36- # This pulls from the "Get Changelog Entry" step above, referencing it's ID to get its outputs object.
37- # See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
38- tag_name : ${{ github.ref }}
39- release_name : COMPAS ${{ steps.changelog_reader.outputs.version }}
40- body : ${{ steps.changelog_reader.outputs.changes }}
41- prerelease : ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
42- draft : ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
43-
44- - name : Set up Python 3.9
45- uses : actions/setup-python@v2
46- with :
47- python-version : 3.9
10+ runs-on : ${{ matrix.os }}
11+ strategy :
12+ matrix :
13+ os : [ubuntu-latest, macos-latest, windows-latest]
14+ python : ['3.8', '3.9', '3.10']
4815
49- -
uses :
compas-dev/[email protected] 16+ steps :
17+ - uses : compas-dev/compas-actions.build@v3
5018 with :
51- test_lint : true
52- test_compas : true
53- 54- - name : Install dependencies
55- run : |
56- choco install ironpython --version=2.7.8.1
19+ python : ${{ matrix.python }}
20+ invoke_lint : true
21+ check_import : true
5722
58- - name : 🦗 Build grasshopper components
59- uses : compas-dev/compas-actions.ghpython_components@v2
23+ publish :
24+ needs : build
25+ runs-on : windows-latest
26+ steps :
27+ - uses : compas-dev/compas-actions.publish@v2
6028 with :
61- source : src/compas_ghpython/components
62- target : src/compas_ghpython/components/ghuser
63- - name : 💃 Build release
64- if : success() && startsWith(github.ref, 'refs/tags')
65- run : |
66- python setup.py clean --all sdist bdist_wheel
67- - name : 📦 Publish release to PyPI
68- if : success() && startsWith(github.ref, 'refs/tags')
69- run : |
70- twine check dist/*
71- twine upload dist/* --skip-existing
72- env :
73- TWINE_USERNAME : __token__
74- TWINE_PASSWORD : ${{ secrets.PYPI }}
29+ pypi_token : ${{ secrets.PYPI }}
30+ github_token : ${{ secrets.GITHUB_TOKEN }}
31+ build_ghpython_components : true
32+ gh_source : src/compas_ghpython/components
33+ gh_target : src/compas_ghpython/components/ghuser
0 commit comments