-
Notifications
You must be signed in to change notification settings - Fork 26
104 lines (86 loc) · 2.84 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
on:
push:
tags:
- 'v*'
name: Create Release
jobs:
build:
if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')"
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Installing Python3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Installing package
run: |
python -m pip install --upgrade pip
python -m pip install --no-cache-dir -r requirements-dev.txt
- name: Running linter
run: |
invoke lint
- name: Running unit-tests
run: |
invoke test
publish:
needs: build
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Get Version From Tag
id: tag_name
run: |
echo "current_version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
shell: bash
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md
- name: Assemble Release Name
id: assemble_release_name
shell: bash
run: |
release_name="${{ github.ref_name }}"
echo Using release name: $release_name
echo "release_name=$release_name" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
body: ${{ steps.changelog_reader.outputs.changes }}
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.assemble_release_name.outputs.release_name }}
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install CPython dependencies
run: |
python -m pip install --upgrade pip
python -m pip install wheel
python -m pip install --no-cache-dir -r requirements-dev.txt
- uses: NuGet/[email protected]
- name: Install dependencies
run: |
choco install ironpython --version=2.7.8.1
- uses: compas-dev/compas-actions.ghpython_components@v4
with:
source: src/compas_timber/ghpython/components
target: src/compas_timber/ghpython/components/ghuser
prefix: "CT: "
- name: Copy manual components
run: |
cp src/compas_timber/ghpython/ghuser_manual/* src/compas_timber/ghpython/components/ghuser/
- shell: bash
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
python setup.py clean --all sdist bdist_wheel
twine check dist/*
twine upload dist/* --skip-existing
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI }}