You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
added github-api-url and change axios to got (#135)
* added github-api-url and change axios to got
* docs: format action manifest
* chore: restore old package version
I'll bump the version on the main branch
Co-authored-by: jacubic <jason.cubic@daimler.com>
Co-authored-by: Federico Grandi <fgrandi30@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ You can use this GitHub action to check whether your npm package version has bee
7
7
8
8
The main difference between this action and many others out there is that this doesn't do a specific task (it doesn't publish to registries, create tags or releases, send notifications, ...) but instead gives you an output that you can use in other steps of your workflow as you prefer: this way you don't have to deal with stuff you don't care about ;)
9
9
10
-
This action is heavily inspired by [`npm-publish-action`](https://github.com/pascalgn/npm-publish-action) by [pascal](https://github.com/pascalgn): if you only care about publishing your package to npm automatically, this is the simplest solution :thumbsup:
10
+
This action is heavily inspired by [`npm-publish-action`](https://github.com/pascalgn/npm-publish-action) by [pascal](https://github.com/pascalgn): if you only care about publishing your package to npm automatically, this is the simplest solution :thumbsup:
11
11
12
12
## Usage
13
13
@@ -21,7 +21,7 @@ You have to set up a step like this in your workflow (this assumes you've alread
21
21
22
22
with: # All these parameters are optional, check their descriptions to see if you need them.
23
23
24
-
# Whether to search in every commit's diff.
24
+
# Whether to search in every commit's diff.
25
25
# This is useful if you often do change the version without saying it in the commit message. If you always include the semver of the new version in your commit message when you bump versions then you can omit this.
26
26
# Default: false
27
27
diff-search: true
@@ -51,6 +51,10 @@ You have to set up a step like this in your workflow (this assumes you've alread
51
51
# Please note that using the wrong value may make the action detect the change but fail to identify the type.
52
52
# Default: ''
53
53
static-checking: localIsNew
54
+
55
+
# If you are using an instance of GitHub Enterprise you can use this option to change the location of your GitHub api url.
56
+
# Default: 'https://api.github.com'
57
+
github-api-url: https://git.contoso.com/api/v3
54
58
```
55
59
56
60
Now, when someone changes the version in `package.json` to `1.2.3` and pushes a commit with the message `<WHATEVER> 1.2.3` (eg. `Release 1.2.3` or `Bump version to v1.2.3`), output values are set (see Outputs below).
@@ -64,8 +68,8 @@ Please note that even if the action is built to be easier as possible to use, it
64
68
- `version`: if the version has changed, it shows the version number (e.g. "1.0.2")
65
69
- `commit`: if the version has changed, it shows the sha of the commit where the change has been found.
66
70
67
-
To access these outputs, you need to access the context of the step you previously set up: you can find more info about steps contexts [here](https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions#steps-context).
68
-
If you set your step id to `check` you'll find the outputs at `steps.check.outputs.OUTPUT_NAME`: you can use these outputs as conditions for other steps.
71
+
To access these outputs, you need to access the context of the step you previously set up: you can find more info about steps contexts [here](https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions#steps-context).
72
+
If you set your step id to `check` you'll find the outputs at `steps.check.outputs.OUTPUT_NAME`: you can use these outputs as conditions for other steps.
69
73
Here's an example:
70
74
71
75
```yaml
@@ -88,7 +92,7 @@ Please keep in mind that when the `static-checking` option is used the `commit`
88
92
89
93
### Publishing automatically to both NPM & GitHub Package Registry
90
94
91
-
If you want to see how to publish automatically your package to both NPM & GPR, please see [this](doc/auto-publish-example.yml) example workflow ;)
95
+
If you want to see how to publish automatically your package to both NPM & GPR, please see [this](doc/auto-publish-example.yml) example workflow ;)
92
96
You can also find a more in-depth guide in this [here](doc/auto-publish-walkthrough.md).
93
97
94
98
### Static-checking with your latest version on NPM
0 commit comments