Skip to content

Commit

Permalink
feat: support individual arguments within uplift action (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
ga-paul-t authored Jun 25, 2021
1 parent 7521f46 commit 11e5fd6
Show file tree
Hide file tree
Showing 7 changed files with 1,071 additions and 205 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@

name: auto-merge
on:
workflow_run:
workflows: ['ci']
types:
- completed
branches_ignore: [main]
pull_request:
jobs:
auto-merge:
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v2
with:
Expand All @@ -46,3 +48,8 @@ jobs:
run: npm run build
- name: Package
run: npm run package
- name: Tag
if: github.ref == 'refs/heads/main'
uses: gembaadvantage/uplift-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 9 additions & 0 deletions .uplift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
bumps:
- file: ./package.json
regex: '"version": "$VERSION"'
semver: true
count: 1
- file: ./package-lock.json
regex: '"version": "$VERSION"'
semver: true
count: 1
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,25 @@ Easily integrate uplift into your existing workflows, by using the `@v1` of the
```yaml
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: gembaadvantage/uplift-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
You can configure the behaviour of uplift by setting some inputs:
```yaml
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: gembaadvantage/uplift-action@v1
with:
version: latest
dry-run: true
verbose: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -24,7 +40,8 @@ steps:
Customisable inputs can be provided through the use of the `step.with` keys:

| Name | Type | Default | Description |
| ------- | ------ | -------- | -------------------------------------------------------------------------------------- |
| version | String | `latest` | The uplift version, see [available](https://github.com/gembaadvantage/uplift/releases) |
| args | String | | Command line arguments to pass to uplift |
| Name | Required | Type | Default | Description |
| ------- | -------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
| version | No | String | `latest` | The uplift version, see [available](https://github.com/gembaadvantage/uplift/releases) |
| dry-run | No | Boolean | false | Set to true to prevent any changes from being committed. Useful if you want to calculate the next tag for example |
| verbose | No | Boolean | false | Set to true if you want verbose (_debug_) output from Uplift |
25 changes: 14 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,25 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

name: "Uplift Action"
description: "GitHub Action for Uplift, the semantic versioning tool built for CI"
author: "gembaadvantage"
name: 'Uplift Action'
description: 'GitHub Action for Uplift, the semantic versioning tool built for CI'
author: 'gembaadvantage'
branding:
color: "blue"
icon: "tag"
color: 'blue'
icon: 'tag'

inputs:
version:
description: "Uplift version"
default: "latest"
description: 'Uplift version'
default: 'latest'
required: false
args:
description: "Arguments to pass to Uplift"
dry-run:
description: 'If Uplift should not commit any changes'
required: false
verbose:
description: 'If Uplift should log using verbose (debug) mode'
required: false

runs:
using: "node12"
main: "dist/index.js"
using: 'node12'
main: 'dist/index.js'
Loading

0 comments on commit 11e5fd6

Please sign in to comment.