crawler-user-agents 1.3.0 → 1.4.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.
@@ -0,0 +1,48 @@
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"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crawler-user-agents",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "main": "crawler-user-agents.json",
5
5
  "typings": "./index.d.ts",
6
6
  "author": "Martin Monperrus <martin.monperrus@gnieh.org>",