-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from wemogy/main
Release
- Loading branch information
Showing
16 changed files
with
548 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,16 +15,13 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup git | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "wemogy IT" | ||
- name: Get version for next release | ||
id: get-release-version | ||
uses: ./.github/actions/local-action | ||
with: | ||
create-tag: "true" | ||
git-username: "wemogy IT" | ||
git-email: "[email protected]" | ||
|
||
- name: Build Containers | ||
uses: ./.github/actions/containers | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,11 +39,6 @@ jobs: | |
- name: Setup Python | ||
uses: ./.github/actions/setup-python | ||
|
||
- name: Setup git | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Wemogy IT" | ||
- name: Run pytest | ||
run: poetry run pytest --junit-xml test-result.xml tests/e2e | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,20 +11,18 @@ for [Conventional Commits](https://www.conventionalcommits.org/) with support fo | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup git for annotated tags | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Your username" | ||
- uses: wemogy/[email protected] | ||
- uses: wemogy/[email protected] | ||
id: get-release-version | ||
with: | ||
prefix: "v" | ||
suffix: "beta" | ||
reference-version-suffix: "dev" | ||
suffix: "NONE" | ||
reference-version-suffix: "NONE" | ||
bumping-suffix: "hotfix" | ||
only-bump-suffix: "true" | ||
only-bump-suffix: "false" | ||
create-tag: "true" | ||
git-username: "Your User" | ||
git-email: "[email protected]" | ||
mode: "semantic" | ||
|
||
- run: echo ${{ steps.get-release-version.outputs.version }} | ||
- run: echo ${{ steps.get-release-version.outputs.version-name }} | ||
|
@@ -35,20 +33,22 @@ for [Conventional Commits](https://www.conventionalcommits.org/) with support fo | |
### Inputs | ||
| Input | Required | Default | Description | | ||
| -------------------------- | -------- | ---------- | -------------------------------------------------------------------------------------------------------- | | ||
| `prefix` | `false` | `v` | The prefix that should be prepended to the version. | | ||
| `suffix` | `false` | `NONE` | The suffix that should be appended to the version (e.g. `beta`). Use `NONE` for no suffix. | | ||
| `reference-version-suffix` | `false` | `NONE` | The suffix that should be replaced with the value in `suffix` (e.g. `dev`). Use `NONE` for no suffix. | | ||
| `bumping-suffix` | `false` | `hotfix` | The suffix to append to the version (or increment if it already exists) if `only-bump-suffix` is `true`. | | ||
| `only-bump-suffix` | `false` | `false` | Bump the `bumping-suffix` instead of the version if changes were detected. | | ||
| `create-tag` | `false` | `true` | Create a git tag for the version and push it if a remote is configured. | | ||
| `mode` | `false` | `semantic` | The mode to use for determining the next version. Possible values: `semantic`, `hash-based`. | | ||
| Input | Required | Default | Description | | ||
|----------------------------|---------------------------|------------|----------------------------------------------------------------------------------------------------------| | ||
| `prefix` | `false` | `v` | The prefix that should be prepended to the version. | | ||
| `suffix` | `false` | `NONE` | The suffix that should be appended to the version (e.g. `beta`). Use `NONE` for no suffix. | | ||
| `reference-version-suffix` | `false` | `NONE` | The suffix that should be replaced with the value in `suffix` (e.g. `dev`). Use `NONE` for no suffix. | | ||
| `bumping-suffix` | `false` | `hotfix` | The suffix to append to the version (or increment if it already exists) if `only-bump-suffix` is `true`. | | ||
| `only-bump-suffix` | `false` | `false` | Bump the `bumping-suffix` instead of the version if changes were detected. | | ||
| `create-tag` | `false` | `true` | Create a git tag for the version and push it if a remote is configured. | | ||
| `git-username` | If `create-tag` is `true` | `NONE` | The username for creating the (annotated) git tag. Use `NONE` for no username. | | ||
| `git-email` | If `create-tag` is `true` | `NONE` | The email address for creating the (annotated) git tag. Use `NONE` for no email address. | | ||
| `mode` | `false` | `semantic` | The mode to use for determining the next version. Possible values: `semantic`, `hash-based`. | | ||
|
||
### Outputs | ||
|
||
| Output | Description | | ||
| ----------------------- | ----------------------------------------------------------- | | ||
|-------------------------|-------------------------------------------------------------| | ||
| `version` | The next version, without the prefix. | | ||
| `version-name` | The next version, with the prefix. | | ||
| `previous-version` | The previous version, without the prefix. | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,8 @@ def test_initial(repo: TestRepo) -> None: | |
"""Test Case: Run the action directly after the initial commit.""" | ||
# Arrange | ||
args_release = ActionInputs( | ||
git_username='wemogy IT', | ||
git_email='[email protected]', | ||
prefix='v', | ||
suffix='pre', | ||
reference_version_suffix=None, | ||
|
@@ -24,6 +26,8 @@ def test_initial(repo: TestRepo) -> None: | |
) | ||
|
||
args_beta = ActionInputs( | ||
git_username='wemogy IT', | ||
git_email='[email protected]', | ||
prefix='v', | ||
suffix='beta', | ||
only_bump_suffix=True, | ||
|
@@ -40,6 +44,8 @@ def test_initial(repo: TestRepo) -> None: | |
) | ||
|
||
args_prod = ActionInputs( | ||
git_username='wemogy IT', | ||
git_email='[email protected]', | ||
prefix='v', | ||
suffix=None, | ||
only_bump_suffix=True, | ||
|
@@ -83,6 +89,8 @@ def test_chore(repo: TestRepo) -> None: | |
"""Test Case: Run the action after a ``chore:`` commit.""" | ||
# Arrange | ||
args_release = ActionInputs( | ||
git_username='wemogy IT', | ||
git_email='[email protected]', | ||
prefix='v', | ||
suffix='pre', | ||
reference_version_suffix=None, | ||
|
@@ -98,6 +106,8 @@ def test_chore(repo: TestRepo) -> None: | |
) | ||
|
||
args_beta = ActionInputs( | ||
git_username='wemogy IT', | ||
git_email='[email protected]', | ||
prefix='v', | ||
suffix='beta', | ||
only_bump_suffix=True, | ||
|
@@ -114,6 +124,8 @@ def test_chore(repo: TestRepo) -> None: | |
) | ||
|
||
args_prod = ActionInputs( | ||
git_username='wemogy IT', | ||
git_email='[email protected]', | ||
prefix='v', | ||
suffix=None, | ||
only_bump_suffix=True, | ||
|
@@ -159,6 +171,8 @@ def test_fix(repo: TestRepo) -> None: | |
"""Test Case: Run the action after a ``fix:`` commit.""" | ||
# Arrange | ||
args_release = ActionInputs( | ||
git_username='wemogy IT', | ||
git_email='[email protected]', | ||
prefix='v', | ||
suffix='pre', | ||
reference_version_suffix=None, | ||
|
@@ -174,6 +188,8 @@ def test_fix(repo: TestRepo) -> None: | |
) | ||
|
||
args_beta = ActionInputs( | ||
git_username='wemogy IT', | ||
git_email='[email protected]', | ||
prefix='v', | ||
suffix='beta', | ||
only_bump_suffix=True, | ||
|
@@ -190,6 +206,8 @@ def test_fix(repo: TestRepo) -> None: | |
) | ||
|
||
args_prod = ActionInputs( | ||
git_username='wemogy IT', | ||
git_email='[email protected]', | ||
prefix='v', | ||
suffix=None, | ||
only_bump_suffix=True, | ||
|
@@ -235,6 +253,8 @@ def test_feat(repo: TestRepo) -> None: | |
"""Test Case: Run the action after a ``feat:`` commit.""" | ||
# Arrange | ||
args_release = ActionInputs( | ||
git_username='wemogy IT', | ||
git_email='[email protected]', | ||
prefix='v', | ||
suffix='pre', | ||
reference_version_suffix=None, | ||
|
@@ -250,6 +270,8 @@ def test_feat(repo: TestRepo) -> None: | |
) | ||
|
||
args_beta = ActionInputs( | ||
git_username='wemogy IT', | ||
git_email='[email protected]', | ||
prefix='v', | ||
suffix='beta', | ||
only_bump_suffix=True, | ||
|
@@ -266,6 +288,8 @@ def test_feat(repo: TestRepo) -> None: | |
) | ||
|
||
args_prod = ActionInputs( | ||
git_username='wemogy IT', | ||
git_email='[email protected]', | ||
prefix='v', | ||
suffix=None, | ||
only_bump_suffix=True, | ||
|
@@ -311,6 +335,8 @@ def test_breaking(repo: TestRepo) -> None: | |
"""Test Case: Run the action after a ``feat!:`` commit.""" | ||
# Arrange | ||
args_release = ActionInputs( | ||
git_username='wemogy IT', | ||
git_email='[email protected]', | ||
prefix='v', | ||
suffix='pre', | ||
reference_version_suffix=None, | ||
|
@@ -326,6 +352,8 @@ def test_breaking(repo: TestRepo) -> None: | |
) | ||
|
||
args_beta = ActionInputs( | ||
git_username='wemogy IT', | ||
git_email='[email protected]', | ||
prefix='v', | ||
suffix='beta', | ||
only_bump_suffix=True, | ||
|
@@ -342,6 +370,8 @@ def test_breaking(repo: TestRepo) -> None: | |
) | ||
|
||
args_prod = ActionInputs( | ||
git_username='wemogy IT', | ||
git_email='[email protected]', | ||
prefix='v', | ||
suffix=None, | ||
only_bump_suffix=True, | ||
|
Oops, something went wrong.