Skip to content

Commit

Permalink
release drafter for each package
Browse files Browse the repository at this point in the history
  • Loading branch information
zulissimeta committed Aug 10, 2024
1 parent 5ce3ff1 commit 5fb5f9e
Show file tree
Hide file tree
Showing 12 changed files with 259 additions and 40 deletions.
15 changes: 15 additions & 0 deletions .github/release-drafter.yml → .github/release-drafter-core.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
include-paths:
- src/fairchem/core/
tag-prefix: fairchem_core
name-template: 'fairchem_core_v$RESOLVED_VERSION'
exclude-contributors: [github-actions, dependabot]
categories:
- title: New Features
Expand All @@ -14,6 +18,17 @@ categories:
labels: [deprecation]
- title: Other Changes
labels: ["*"]
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## What’s Changed
Expand Down
37 changes: 37 additions & 0 deletions .github/release-drafter-data_demo_ocpapi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
include-paths:
- src/fairchem/demo/ocpapi
tag-prefix: fairchem_demo_ocpapi
name-template: 'fairchem_demo_ocpapi_v$RESOLVED_VERSION'
exclude-contributors: [github-actions, dependabot]
categories:
- title: New Features
labels: [enhancement]
- title: Bug Fixes
labels: [bug]
- title: 🛠 Enhancements
labels: [enhancement]
- title: Documentation
labels: [documentation]
- title: Tests
labels: [test]
- title: Deprecations
labels: [deprecation]
- title: Other Changes
labels: ["*"]
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## What’s Changed
$CHANGES
$CONTRIBUTORS
37 changes: 37 additions & 0 deletions .github/release-drafter-data_oc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
include-paths:
- src/fairchem/data/oc
tag-prefix: fairchem_data_oc
name-template: 'fairchem_data_oc_v$RESOLVED_VERSION'
exclude-contributors: [github-actions, dependabot]
categories:
- title: New Features
labels: [enhancement]
- title: Bug Fixes
labels: [bug]
- title: 🛠 Enhancements
labels: [enhancement]
- title: Documentation
labels: [documentation]
- title: Tests
labels: [test]
- title: Deprecations
labels: [deprecation]
- title: Other Changes
labels: ["*"]
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## What’s Changed
$CHANGES
$CONTRIBUTORS
37 changes: 37 additions & 0 deletions .github/release-drafter_applications_cattsunami.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
include-paths:
- src/fairchem/applications/cattsunami
tag-prefix: fairchem_applications_cattsunami
name-template: 'fairchem_applications_cattsunami_v$RESOLVED_VERSION'
exclude-contributors: [github-actions, dependabot]
categories:
- title: New Features
labels: [enhancement]
- title: Bug Fixes
labels: [bug]
- title: 🛠 Enhancements
labels: [enhancement]
- title: Documentation
labels: [documentation]
- title: Tests
labels: [test]
- title: Deprecations
labels: [deprecation]
- title: Other Changes
labels: ["*"]
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## What’s Changed
$CHANGES
$CONTRIBUTORS
14 changes: 14 additions & 0 deletions .github/workflows/label_checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: PR labels contains one of (patch, minor, major)

on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]

jobs:
check-labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Labels not added (patch, minor, major)
if: contains(github.event.pull_request.labels.*.name, 'patch') == false && contains(github.event.pull_request.labels.*.name, 'minor') == false && contains(github.event.pull_request.labels.*.name, 'major') == false
run: exit 1
28 changes: 28 additions & 0 deletions .github/workflows/release-drafter-applications_cattsunami.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release Drafter - fairchem_applications_cattsunami

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main
paths:
- 'src/fairchem/applications/cattsunami/**'
workflow_dispatch:

permissions:
contents: read

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
with:
disable-autolabeler: true
latest: true
config-name: release-draft-applications_cattsunami
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/release-drafter-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release Drafter - fairchem_core

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main
paths:
- 'src/fairchem/core/**'
workflow_dispatch:

permissions:
contents: read

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
with:
disable-autolabeler: true
latest: true
config-name: release-draft-core
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/release-drafter-data_oc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release Drafter - fairchem_data_oc

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main
paths:
- 'src/fairchem/data/oc/**'
workflow_dispatch:


permissions:
contents: read

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
with:
disable-autolabeler: true
latest: true
config-name: release-draft-data_oc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/release-drafter-demo_ocpapi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release Drafter - fairchem_demo_ocpapi

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main
paths:
- 'src/fairchem/demo/ocpapi/**'
workflow_dispatch:


permissions:
contents: read

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
with:
disable-autolabeler: true
latest: true
config-name: release-draft-demo_ocpapi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 changes: 0 additions & 35 deletions .github/workflows/release-drafter.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
needs: [ build ]
runs-on: ubuntu-latest
if: |
( github.event.inputs.release-pypi == 'true')
( github.event.inputs.release-pypi == 'true' && startsWith(github.ref_name, 'fairchem_core-') ) || startsWith(github.event.release.tag_name, 'fairchem_core-')
environment:
name: pypi
Expand All @@ -54,7 +54,7 @@ jobs:
needs: [ build ]
runs-on: ubuntu-latest
if: |
( github.event.inputs.release-pypi == 'true')
( github.event.inputs.release-pypi == 'true' && startsWith(github.ref_name, 'fairchem_data_oc-') ) || startsWith(github.event.release.tag_name, 'fairchem_data_oc-')
environment:
name: pypi
Expand All @@ -79,7 +79,7 @@ jobs:
needs: [ build ]
runs-on: ubuntu-latest
if: |
( github.event.inputs.release-pypi == 'true')
( github.event.inputs.release-pypi == 'true' && startsWith(github.ref_name, 'fairchem_demo_ocpapi-') ) || startsWith(github.event.release.tag_name, 'fairchem_demo_ocpapi-')
environment:
name: pypi
Expand All @@ -104,7 +104,7 @@ jobs:
needs: [ build ]
runs-on: ubuntu-latest
if: |
( github.event.inputs.release-pypi == 'true')
( github.event.inputs.release-pypi == 'true' && startsWith(github.ref_name, 'fairchem_applications_cattsunami-') ) || startsWith(github.event.release.tag_name, 'fairchem_applications_cattsunami-')
environment:
name: pypi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

docs:
needs: test
uses: ./.github/workflows/docs.yml
uses: ./.github/workflows/build_docs.yml
secrets: inherit

release-core:
Expand Down

0 comments on commit 5fb5f9e

Please sign in to comment.