diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b1ab4b8..ef609f1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,9 +1,8 @@ name: publish on: - push: - tags: - - '*.*.*' # only match semver tags + release: + types: [published] jobs: pypi: diff --git a/DEVELOPERS.md b/DEVELOPERS.md index 4abd10a..136e817 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -2,7 +2,13 @@ ## Publishing New Releases -First, determine which semver level to bump. Use this table if you are unsure: +First, create a new release branch, using the naming convention "release/": + +```shell +git checkout -b release/0.1.1 +``` + +Next, determine which semver level to bump. Use this table if you are unsure: | Resource | Documentation | Add | Update | Remove | |-----------------------------|:-------------:|:-----:|:------:|:------:| @@ -14,7 +20,7 @@ First, determine which semver level to bump. Use this table if you are unsure: | data model field (optional) | patch | minor | major | major | | data model field (required) | patch | major | major | major | -Once chosen, use: +Then, execute the following in your release branch. ```shell poetry version @@ -24,31 +30,7 @@ Which will update `pyproject.toml` and print the new version: > Bumping version from 0.1.0 to 0.1.1 -Next, use [git-release] (available via [git-extras]) and pass along the updated version: - -```shell -git release -c -``` - -This will update the changelog and open your `$EDITOR` to review and make any manual changes. Once saved, the tag will -be created and pushed to Github, where the release will automatically be published to PyPI via Github Actions. - -### One-Liner - -To simplify the steps above, once you've chosen your semver level: - -```shell -git release `poetry version -s` -c -``` - -**NOTE:** the use of `poetry version ... -s` to only output the new version. - -For example, to publish a new minor version: - -```shell -git release `poetry version minor -s` -c -``` - +Commit this change and open a Pull Request with your branch. Once approved and merged, create a new release using the +GitHub Releases UI. Make sure to generate a new tag corresponding to the new version. -[git-extras]: https://github.com/tj/git-extras -[git-release]: https://github.com/tj/git-extras/blob/master/Commands.md#git-release \ No newline at end of file +Once published, a GitHub Actions workflow will take care of publishing the new release to PyPI. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 82be22d..09b59d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "rippling-flux-dev-tools" -version = "0.0.1" +version = "0.0.2" description = "Rippling Flux App development tools." authors = ["Rippling Apps "] readme = "README.md"