Skip to content

Merge pull request #14 from tilde-lab/master #8

Merge pull request #14 from tilde-lab/master

Merge pull request #14 from tilde-lab/master #8

Workflow file for this run

---
# yamllint disable rule:line-length
name: Push action
on:
push:
branches:
- master
jobs:
test:
uses: ./.github/workflows/test.yml
release:
name: Bump version and create draft release
runs-on: ubuntu-latest
needs: test
permissions:
contents: write
concurrency:
group: release
steps:
- name: Checkout repository
uses: actions/checkout@v4
if: ${{ !env.ACT }} # skip during local actions testing
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[release]
- name: Create bump and changelog
id: cz
if: github.repository == 'metis-science/pytopas'
uses: commitizen-tools/commitizen-action@4498afe6f2f1c5993fb29f22db7b597538c00aae
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
changelog_increment_filename: .CHANGELOG-CURRENT.md
push: true
commit: true
- name: Print new version
if: github.repository == 'metis-science/pytopas'
run: echo "Bumped to version ${{ steps.cz.outputs.version }}"
- name: Build
run: make dist
- name: Stop if no bump
id: no-bump
continue-on-error: true
# will fail if not on exact tag
run: git describe --tags --exact-match
- name: Create Release Draft
uses: softprops/action-gh-release@c9b46fe7aad9f02afd89b12450b780f52dacfb2d
if: steps.no-bump.outcome == 'success'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
tag_name: v${{ steps.cz.outputs.version }}
body_path: .CHANGELOG-CURRENT.md
fail_on_unmatched_files: true
files: dist/*