Create Release #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: " | |
- 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 }} |