Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ Creates a new GitHub release based on git tags and [semantic versioning](https:/
variable for target branch name (see: https://cli.github.com/manual/gh_release_create).

### Inputs
| Name | Description | Optional |
|---------|:---------------------------------|----------|
| major_v | major version of current release | False |
| minor_v | minor version of current release | False |
| Name | Description | Optional |
|-------------|:-----------------------------------------|----------|
| major_v | major version of current release | False |
| minor_v | minor version of current release | False |
| assets_path | assets to upload for the current release | True |

### Outputs
| Name | Description |
Expand All @@ -56,10 +57,11 @@ jobs:
with:
fetch-depth: 0
- name: Create Release
uses: SneaksAndData/github-actions/semver_release@v0.0.17
uses: SneaksAndData/github-actions/semver_release@v0.1.10
with:
major_v: 0
minor_v: 0
assets_path: ./dist
```

## install_poetry
Expand Down
5 changes: 5 additions & 0 deletions semver_release/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ inputs:
description: minor version of current release
required: true

assets_path:
description: optional release assets. All files under the path prefix will be uploaded as release assets.
required: false

outputs:
version:
description: "Version"
Expand All @@ -29,4 +33,5 @@ runs:
MINOR_V: ${{ inputs.minor_v }}
GITHUB_TOKEN: ${{ github.token }}
TARGET_BRANCH_MAME: ${{ github.ref }}
ASSETS_LOCATION: ${{ github.assets_path }}
shell: bash
11 changes: 10 additions & 1 deletion semver_release/semver_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,14 @@ else
nextRevision='0'
fi
nextVersion="v$providedMajor.$providedMinor.$nextRevision"
gh release create "$nextVersion" --generate-notes --target "$TARGET_BRANCH_MAME"

assets=$ASSETS_LOCATION

if [[ -z "${assets}" ]];
then
gh release create "$nextVersion" --generate-notes --target "$TARGET_BRANCH_MAME"
else
gh release create "$nextVersion" --generate-notes --target "$TARGET_BRANCH_MAME" "$assets/*.*"
fi

echo "version=$nextVersion" >> "$GITHUB_OUTPUT"