diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml new file mode 100644 index 0000000..c4ede52 --- /dev/null +++ b/.github/workflows/pr-title.yml @@ -0,0 +1,33 @@ +name: PR Title Check + +on: + pull_request: + types: [opened, edited, synchronize, reopened] + +jobs: + validate: + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # Require conventional commit format: type(scope): description + # Types allowed (default set) + types: | + feat + fix + docs + style + refactor + perf + test + build + ci + chore + revert + # Scope is optional + requireScope: false + # Subject (description) requirements + subjectPattern: ^.+$ + subjectPatternError: "PR title must have a description after the type" diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..e4026cc --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,21 @@ +name: Release Please + +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + with: + release-type: simple + package-name: xarray_plotly + # Keep version at 0.0.x - feat: bumps patch instead of minor + bump-patch-for-minor-pre-major: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 882eeb0..d11e298 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,6 @@ jobs: runs-on: ubuntu-latest permissions: id-token: write # for trusted publishing - contents: write # for creating GitHub release steps: - uses: actions/checkout@v6 @@ -23,9 +22,3 @@ jobs: - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - - - name: Create GitHub Release - uses: softprops/action-gh-release@v2 - with: - generate_release_notes: true - files: dist/*