Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
# Labels names are important as they are used by Release Drafter to decide
# regarding where to record them in changelog or if to skip them.
#
# The repository labels will be automatically configured using this file and
# the GitHub Action https://github.com/marketplace/actions/github-labeler.
- name: breaking
description: Breaking Changes
color: bfd4f2
- name: bug
description: Something isn't working
color: d73a4a
- name: build
description: Build System and Dependencies
color: bfdadc
- name: ci
description: Continuous Integration
color: 4a97d6
- name: dependencies
description: Pull requests that update a dependency file
color: 0366d6
- name: documentation
description: Improvements or additions to documentation
color: 0075ca
- name: duplicate
description: This issue or pull request already exists
color: cfd3d7
- name: enhancement
description: New feature or request
color: a2eeef
- name: github_actions
description: Pull requests that update Github_actions code
color: "000000"
- name: good first issue
description: Good for newcomers
color: 7057ff
- name: help wanted
description: Extra attention is needed
color: 008672
- name: invalid
description: This doesn't seem right
color: e4e669
- name: performance
description: Performance
color: "016175"
- name: python
description: Pull requests that update Python code
color: 2b67c6
- name: question
description: Further information is requested
color: d876e3
- name: refactoring
description: Refactoring
color: ef67c4
- name: removal
description: Removals and Deprecations
color: 9ae7ea
- name: style
description: Style
color: c120e5
- name: testing
description: Testing
color: b1fc6f
- name: wontfix
description: This will not be worked on
color: ffffff
73 changes: 73 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
autolabeler:
- label: "github_actions"
files:
- ".github/workflows/*"
- label: "ci"
files:
- ".github/*"
- label: "documentation"
files:
- "*.md"
branch:
- '/docs{0,1}\/.+/'
- label: "bug"
branch:
- '/fix\/.+/'
title:
- "/fix/i"
- label: "enhancement"
branch:
- '/feature\/.+/'
- '/add\/.+/'
- '/support\/.+/'
title:
- "/add/i"
- "/support/i"
- label: "refactoring"
branch:
- '/refactor\/.+/'
title:
- "/refactor/i"
- label: "removal"
branch:
- '/deprecate\/.+/'
- '/remove\/.+/'
title:
- "/deprecate/i"
- "/remove/i"
- label: "testing"
branch:
- '/test\/.+/'
title:
- "/test/i"
categories:
- title: ":boom: Breaking Changes"
label: "breaking"
- title: ":rocket: Features"
label: "enhancement"
- title: ":fire: Removals and Deprecations"
label: "removal"
- title: ":beetle: Fixes"
label: "bug"
- title: ":racehorse: Performance"
label: "performance"
- title: ":rotating_light: Testing"
label: "testing"
- title: ":construction_worker: Continuous Integration"
labels:
- "ci"
- "github_actions"
- title: ":books: Documentation"
label: "documentation"
- title: ":hammer: Refactoring"
label: "refactoring"
- title: ":lipstick: Style"
label: "style"
- title: ":package: Dependencies"
labels:
- "dependencies"
- "build"
template: |
## Changes

$CHANGES
15 changes: 15 additions & 0 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Draft release

on:
workflow_dispatch:
# pull_request event is required only for autolabeler
pull_request:
types: [opened, reopened, synchronize]

jobs:
update-release-draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5.15.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Labeler

on:
push:
branches:
- main
- master

jobs:
labeler:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2.3.4

- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v3.1.1
with:
skip-delete: true
80 changes: 80 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Release

on:
push:
branches:
- main
- master

jobs:
publish-pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2.3.4
with:
fetch-depth: 2

- name: Set up Python
uses: actions/setup-python@v2.2.2
with:
python-version: "3.8"

- name: Upgrade pip
run: |
python -m pip install --upgrade pip
pip --version

- name: Install dependencies
run: |
pip install wheel
pip install tox tox-gh-actions

- name: Test with tox
run: tox

- name: Check passthrough models
run: python scripts/generate_passthrough_modules.py check

- name: Check if there is a parent commit
id: check-parent-commit
run: |
echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)"

- name: Detect new version
id: check-version
if: steps.check-parent-commit.outputs.sha
uses: salsify/action-detect-and-tag-new-version@v2.0.1
with:
create-tag: false
version-command: |
bash -o pipefail -c "cat bioimageio/core/VERSION | jq -r '.version'"

- name: Push tag
id: tag-version
if: steps.check-version.outputs.previous-version != steps.check-version.outputs.current-version
uses: mathieudutour/github-tag-action@v5.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.check-version.outputs.current-version }}

- name: Build package
run: |
python setup.py sdist bdist_wheel

- name: Publish package on PyPI
if: steps.tag-version.outputs.new_tag
uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: __token__
password: "${{ secrets.PYPI_TOKEN }}"
packages_dir: dist/

- name: Publish the release notes
uses: release-drafter/release-drafter@v5.15.0
with:
publish: "${{ steps.tag-version.outputs.new_tag != '' }}"
tag: "${{ steps.tag-version.outputs.new_tag }}"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"