diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 095164b..3bb2927 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,7 +3,7 @@ name: Pypi Publish on: release: types: - - created + - published env: HATCH_INDEX_AUTH: ${{ secrets.HATCH_INDEX_AUTH }} HATCH_INDEX_USER: ${{ secrets.HATCH_INDEX_USER }} @@ -14,28 +14,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: 3.9 - - name: Extract Release Name - run: echo "RELEASE_NAME=$(echo $GITHUB_REF | sed -n 's/refs\/tags\///p')" >> $GITHUB_ENV - name: Install hatch run: pip install hatch - name: Publish to Pypi run: | - hatch version $RELEASE_NAME hatch build hatch publish -n - - name: Checkout Main - run: | - git fetch - git stash - git checkout main - git stash apply - - name: Add & Commit - uses: EndBug/add-and-commit@v9.1.3 - with: - add: 'src/flask_muck/__init__.py' - push: origin main --force - diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..d491d90 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,22 @@ +on: + push: + branches: + - main + +permissions: {} + +name: release-please + +jobs: + release-please: + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v4 + with: + # in order to trigger other actions such as Pypi Publish + # need to use a PAT other than the default GITHUB_TOKEN + token: ${{ secrets.RELEASE_PLEASE_TOKEN }} + release-type: python diff --git a/README.md b/README.md index f2281e7..fda096b 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,26 @@ All non-bug-related discussions such as support or feature requests should be su MIT licensed. See the [LICENSE](./LICENSE) file for more details. +## Contributing + +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! + +### How should I write my commits? + +This project uses [release please](https://github.com/googleapis/release-please) and [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) for versioning releases. + +Per [release-please-action](https://github.com/google-github-actions/release-please-action): + +> The most important prefixes you should have in mind are: +> +> - `fix``: which represents bug fixes, and correlates to a SemVer patch. +> - `feat``: which represents a new feature, and correlates to a SemVer minor. +> - `feat!``:, or fix!:, refactor!:, etc., which represent a breaking change (indicated by the !) and will result in a SemVer major. + +Any PR with `fix`, `feat`, `docs`, or a conventional commit with an `!` will trigger a release PR when merged. + +Other conventional commits such as `chore`, `ci`, `test`, `refactor`, etc will not trigger a release but are encouraged to form a standard around conventional commits in the commit history. + ## Contributors ✨ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): @@ -124,8 +144,6 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d -This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! - ## Support Thanks for the stars! They mean nothing but bring me immense satisfaction. Keep 'em coming. diff --git a/pyproject.toml b/pyproject.toml index 584f833..4cb5c37 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,8 +3,8 @@ requires = ["hatchling"] build-backend = "hatchling.build" [project] -name = "Flask-Muck" -dynamic = ["version"] +name = "flask-muck" +version = "0.2.0" authors = [ { name="Daniel Tiesling", email="tiesling@gmail.com" }, ] diff --git a/src/flask_muck/__init__.py b/src/flask_muck/__init__.py index 3096bfb..16c96be 100644 --- a/src/flask_muck/__init__.py +++ b/src/flask_muck/__init__.py @@ -1,4 +1,4 @@ from .views import FlaskMuckApiView from .callback import FlaskMuckCallback -VERSION = "0.2.0" +__version__ = "0.2.0"