Skip to content

Commit

Permalink
Fix release_tag docs and fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
bcomnes committed Mar 11, 2023
1 parent 25fe0a3 commit 82a8d6c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ concurrency: # prevent concurrent releases
jobs:
version_and_release:
runs-on: ubuntu-latest
outputs:
tagName: ${{ steps.npm-bump.outputs.release_tag }}
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -31,10 +33,12 @@ jobs:
- run: npm i
- name: Test, version and publush to npm
uses: bcomnes/npm-bump@master
id: npm-bump
with:
git_email: [email protected]
git_username: ${{ github.actor }}
newversion: ${{ github.event.inputs.newversion }}
publish_cmd: npm run release # dont publish to a registry. set up something else in a different script
github_token: ${{ secrets.GITHUB_TOKEN }} # built in actions token. Passed tp gh-release if in use.
- run: echo ${{ steps.npm-bump.outputs.release_tag }}

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ concurrency: # prevent concurrent releases
jobs:
version_and_release:
runs-on: ubuntu-latest
outputs:
tagName: ${{ steps.npm-bump.outputs.release_tag }}
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -43,6 +45,7 @@ jobs:
- run: npm i
- run: npm test
- name: Version and publish to npm
id: npm-bump
uses: bcomnes/npm-bump@v2
with:
git_email: [email protected]
Expand All @@ -51,6 +54,7 @@ jobs:
push_version_commit: true # if your prePublishOnly step pushes git commits, you can omit this input or set it to false.
github_token: ${{ secrets.GITHUB_TOKEN }} # built in actions token. Passed tp gh-release if in use.
npm_token: ${{ secrets.NPM_TOKEN }} # user set secret token generated at npm
- run: echo ${{ steps.npm-bump.outputs.release_tag }}
```
This will give you a push-button triggered action that runs `npm version {major,minor,patch}`, `git push --follow-tags` and finally `npm publish`.
Expand Down Expand Up @@ -102,7 +106,7 @@ Additionally, you should run your tests in order to block a release that isn't p

### Outputs

None.
- `release_tag`: The name of the created git tag as described by git describe --tags

## FAQ

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ inputs:
description: 'An npm token scoped for publishing. Used to create the release.'
required: false
outputs:
releast_tag:
release_tag:
description: "The name of the created git tag as described by git describe --tags"
value: ${{ steps.release-tag-retreiver.outputs.release-tag }}
runs:
Expand Down

0 comments on commit 82a8d6c

Please sign in to comment.