Skip to content

Commit

Permalink
Merge pull request #3 from im-open/commitish
Browse files Browse the repository at this point in the history
ARCH-1083 - Tweak the default commitish behavior depending on trigger type
  • Loading branch information
danielle-casella-adams committed Oct 8, 2021
2 parents 7dc47f9 + 1a46e88 commit 87fe0f2
Show file tree
Hide file tree
Showing 5 changed files with 191 additions and 486 deletions.
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid",
"printWidth": 100
"printWidth": 130
}
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ This action has the option of uploading a single asset to the release. If more
This action also has the option of deleting the release if it already exists. If a workflow tries to create a release that already exists it will fail which may happen when a workflow is re-run. This functionality is also provided in the [im-open/delete-release-by-tag] action if a release needs to be deleted before the release is created.

## Inputs
| Parameter | Is Required | Default | Description |
| ------------------------- | -------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `github-token` | true | N/A | A token with permission to create and delete releases. Generally secrets.GITHUB_TOKEN. |
| `tag-name` | true | N/A | The name of the tag. |
| `release-name` | false | N/A | The name of the release. Defaults to the tag name if not provided. |
| `commitish` | false | N/A | Any branch or commit SHA the Git tag is created from. Default: SHA of current commit. |
| `body` | false | N/A | Text describing the contents of the release. |
| `body-path` | false | N/A | Path to file with information about the release. |
| `draft` | false | `false` | Flag indicating whether to create a draft (unpublished) release or a published one.<br/>Accepted Values: `true\|false`. Default: `false`. |
| `prerelease` | false | `false` | Flag indicating whether this release is a pre-release or a full release.<br/>Accepted Values: `true\|false`. Default: `false`. |
| `delete-existing-release` | false | `false` | Flag indicating whether to delete then re-create a release if it already exists.<br/>Accepted Values: `true\|false`. Default: `false`. |
| `asset-path` | Required when uploading an asset | N/A | The path to the asset you want to upload. Required when uploading an asset. |
| `asset-name` | Required when uploading an asset | N/A | The name of the asset you want to upload. Required when uploading an asset. |
| `asset-content-type` | Required when uploading an asset | N/A | The content-type of the asset you want to upload. See the [supported Media Types]. Required when uploading an asset. |
| Parameter | Is Required | Description |
| ------------------------- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `github-token` | true | A token with permission to create and delete releases. Generally secrets.GITHUB_TOKEN. |
| `tag-name` | true | The name of the tag. |
| `release-name` | false | The name of the release. Defaults to the tag name if not provided. |
| `commitish` | false | Any branch or commit SHA the Git tag is created from. <br/><br/>Defaults: <br/>• `pull_request` triggers: `context.pull_request.head.sha`<br/>• Other triggers: `context.sha` |
| `body` | false | Text describing the contents of the release. |
| `body-path` | false | Path to file with information about the release. |
| `draft` | false | Flag indicating whether to create a draft (unpublished) release or a published one.<br/>Accepted Values: `true\|false`. Default: `false`. |
| `prerelease` | false | Flag indicating whether this release is a pre-release or a full release.<br/>Accepted Values: `true\|false`. Default: `false`. |
| `delete-existing-release` | false | Flag indicating whether to delete then re-create a release if it already exists.<br/>Accepted Values: `true\|false`. Default: `false`. |
| `asset-path` | Required when uploading an asset | The path to the asset you want to upload. Required when uploading an asset. |
| `asset-name` | Required when uploading an asset | The name of the asset you want to upload. Required when uploading an asset. |
| `asset-content-type` | Required when uploading an asset | The content-type of the asset you want to upload. See the [supported Media Types]. Required when uploading an asset. |

## Outputs
| Output | Description |
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:

- name: Calculate next version
id: version
uses: im-open/git-version-lite@v1.0.0
uses: im-open/git-version-lite@v2.0.0
with:
calculate-prerelease-version: true
branch-name: ${{ github.head_ref }}
Expand All @@ -64,7 +64,7 @@ jobs:
- name: Create Pre-release
id: create_release
uses: im-open/create-release@v1.0.0
uses: im-open/create-release@v2.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
tag-name: ${{ steps.version.outputs.VERSION }}
Expand Down
Loading

0 comments on commit 87fe0f2

Please sign in to comment.