crawler-user-agents 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,6 +13,9 @@ on:
13
13
  types:
14
14
  - completed
15
15
 
16
+ permissions:
17
+ contents: write
18
+
16
19
  jobs:
17
20
  publish-npm:
18
21
  runs-on: ubuntu-latest
@@ -29,9 +32,17 @@ jobs:
29
32
  registry-url: https://registry.npmjs.org/
30
33
  - run: npm clean-install
31
34
  - run: git checkout .
35
+ # fetch the latest version from npm and set it in package.json
32
36
  - run: npm version --no-git-tag-version `node -e 'pacote=require("pacote");pacote.manifest("crawler-user-agents").then(pkgJson => { console.log(pkgJson.version); });'`
33
- # we now bump mino in order to trigger automated dependency updates
37
+ # we now bump the minor in package.json
34
38
  - run: npm version --no-git-tag-version minor
39
+ # publish this new version to npm
35
40
  - run: npm publish --provenance
36
41
  env:
37
42
  NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
43
+ - run: git config user.name "github-actions"
44
+ - run: git config user.email "github-actions@github.com"
45
+ - run: echo "NEW_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
46
+ - run: git tag "v$NEW_VERSION"
47
+ # publish this new version to github (to give the Go module a new version)
48
+ - run: git push origin "v$NEW_VERSION"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crawler-user-agents",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "main": "crawler-user-agents.json",
5
5
  "typings": "./index.d.ts",
6
6
  "author": "Martin Monperrus <martin.monperrus@gnieh.org>",
@@ -1,48 +0,0 @@
1
- name: Update Minor Version and Tag
2
-
3
- on:
4
- workflow_run:
5
- workflows: [CI validation]
6
- branches: [master]
7
- types:
8
- - completed
9
-
10
- permissions:
11
- contents: write
12
-
13
- jobs:
14
- update-minor-version:
15
- runs-on: ubuntu-latest
16
- steps:
17
- - name: Checkout repository
18
- uses: actions/checkout@v4
19
- with:
20
- fetch-depth: 0 # fetch all history for tags
21
-
22
- - name: Get latest tag
23
- id: latest_tag
24
- run: |
25
- latest_tag=$(git describe --tags --abbrev=0 || echo "v1.0.0")
26
- echo "latest_tag=$latest_tag" >> "$GITHUB_OUTPUT"
27
-
28
- - name: Increment minor version
29
- id: increment_version
30
- run: |
31
- latest_tag="${{ steps.latest_tag.outputs.latest_tag }}"
32
- # Remove 'v' prefix
33
- version=${latest_tag#v}
34
- # Split into parts
35
- IFS='.' read -r major minor patch <<< "$version"
36
- # Increment minor, reset patch
37
- minor=$((minor + 1))
38
- patch=0
39
- new_tag="v${major}.${minor}.${patch}"
40
- echo "new_tag=$new_tag" >> "$GITHUB_OUTPUT"
41
-
42
- - name: Create and push new tag
43
- run: |
44
- git config user.name "github-actions[bot]"
45
- git config user.email "github-actions[bot]@users.noreply.github.com"
46
- new_tag="${{ steps.increment_version.outputs.new_tag }}"
47
- git tag "$new_tag"
48
- git push origin "$new_tag"