@openactive/models-ts 1.0.3 → 1.0.5
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.
|
@@ -46,13 +46,20 @@ jobs:
|
|
|
46
46
|
- name: Build models-ts types
|
|
47
47
|
run: npm run build
|
|
48
48
|
working-directory: ./models-ts/
|
|
49
|
-
|
|
49
|
+
|
|
50
|
+
- name: Generate GitHub App Token
|
|
51
|
+
uses: actions/create-github-app-token@v1
|
|
52
|
+
id: generate-token
|
|
53
|
+
with:
|
|
54
|
+
app-id: ${{ secrets.GH_APP_ID }}
|
|
55
|
+
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
|
|
56
|
+
|
|
50
57
|
- name: Create Pull Request
|
|
51
58
|
id: cpr
|
|
52
|
-
uses: peter-evans/create-pull-request@
|
|
59
|
+
uses: peter-evans/create-pull-request@v4
|
|
53
60
|
with:
|
|
54
61
|
path: ./models-ts/
|
|
55
|
-
token: ${{
|
|
62
|
+
token: ${{ steps.generate-token.outputs.token }}
|
|
56
63
|
commit-message: Update data models
|
|
57
64
|
committer: openactive-bot <openactive-bot@users.noreply.github.com>
|
|
58
65
|
author: openactive-bot <openactive-bot@users.noreply.github.com>
|
|
@@ -64,9 +71,6 @@ jobs:
|
|
|
64
71
|
Update JavaScript/TypeScript data models to the latest version based on the [OpenActive Vocabulary](https://openactive.io/ns/) (codified by the [Data Models](https://github.com/openactive/data-models)), [Test Interface](https://openactive.io/test-interface/) and [Beta Namespace](https://openactive.io/ns-beta/).
|
|
65
72
|
labels: |
|
|
66
73
|
automated pr
|
|
67
|
-
team-reviewers: |
|
|
68
|
-
owners
|
|
69
|
-
maintainers
|
|
70
74
|
draft: false
|
|
71
75
|
|
|
72
76
|
- name: Check outputs
|
|
@@ -4,34 +4,50 @@ on:
|
|
|
4
4
|
push:
|
|
5
5
|
branches: [ main ]
|
|
6
6
|
|
|
7
|
+
# Never run two publishes at once; a second merge waits for the first to finish
|
|
8
|
+
concurrency:
|
|
9
|
+
group: publish-to-npm
|
|
10
|
+
cancel-in-progress: false
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
7
15
|
jobs:
|
|
8
16
|
publish:
|
|
9
17
|
runs-on: ubuntu-latest
|
|
10
|
-
|
|
18
|
+
# Loop guard: the version bump commit below is pushed by the OpenActive GitHub App, and also carries [skip ci]
|
|
19
|
+
if: ${{ github.actor != 'openactive[bot]' }}
|
|
11
20
|
|
|
12
21
|
steps:
|
|
22
|
+
- name: Generate GitHub App Token
|
|
23
|
+
uses: actions/create-github-app-token@v1
|
|
24
|
+
id: generate-token
|
|
25
|
+
with:
|
|
26
|
+
app-id: ${{ secrets.GH_APP_ID }}
|
|
27
|
+
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
|
|
13
28
|
- name: Checkout
|
|
14
|
-
uses: actions/checkout@
|
|
29
|
+
uses: actions/checkout@v4
|
|
15
30
|
with:
|
|
16
|
-
token: ${{
|
|
31
|
+
token: ${{ steps.generate-token.outputs.token }}
|
|
17
32
|
- name: Identify
|
|
18
33
|
run: |
|
|
19
|
-
git config user.name
|
|
20
|
-
git config user.email
|
|
21
|
-
- name: Use Node.js
|
|
22
|
-
uses: actions/setup-node@
|
|
34
|
+
git config --global user.name "openactive[bot]"
|
|
35
|
+
git config --global user.email 207210293+openactive[bot]@users.noreply.github.com
|
|
36
|
+
- name: Use Node.js 18.17.1
|
|
37
|
+
uses: actions/setup-node@v4
|
|
23
38
|
with:
|
|
24
|
-
node-version:
|
|
39
|
+
node-version: 18.17.1
|
|
25
40
|
registry-url: https://registry.npmjs.org/
|
|
26
41
|
- name: Install
|
|
27
42
|
run: npm ci
|
|
28
43
|
- name: Test
|
|
29
44
|
run: npm test
|
|
30
45
|
- name: Increment Version
|
|
31
|
-
run: npm version patch
|
|
46
|
+
run: npm version patch -m "%s [skip ci]"
|
|
47
|
+
# Push before publishing: if the push is rejected, nothing is published, so npm can never get ahead of GitHub
|
|
48
|
+
- name: Push version update
|
|
49
|
+
run: git push origin HEAD:main
|
|
32
50
|
- name: Publish to npm
|
|
33
51
|
run: npm publish
|
|
34
52
|
env:
|
|
35
|
-
NODE_AUTH_TOKEN: ${{secrets.
|
|
36
|
-
- name: Push version update
|
|
37
|
-
run: git push
|
|
53
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN2 }}
|