@jakubmazanec/carson-templates 0.2.0-next.e2c3f48 → 0.2.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jakubmazanec/carson-templates",
|
|
3
|
-
"version": "0.2.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Collection of Carson templates.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"semver": "^7.3.6"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@jakubmazanec/carson": "0.1.
|
|
37
|
+
"@jakubmazanec/carson": "^0.1.0",
|
|
38
38
|
"@jakubmazanec/fs-utils": "^0.1.0",
|
|
39
39
|
"@jest/globals": "^29.5.0",
|
|
40
40
|
"@types/fs-extra": "^9.0.13",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"zen-observable": "^0.10.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@jakubmazanec/carson": "0.1.
|
|
48
|
+
"@jakubmazanec/carson": "^0.1.0"
|
|
49
49
|
},
|
|
50
50
|
"packageManager": "npm@8.19.4",
|
|
51
51
|
"engines": {
|
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
to: '.github/workflows/merge-to-main.yaml'
|
|
3
3
|
strategy: overwrite
|
|
4
4
|
---
|
|
5
|
+
<%
|
|
6
|
+
function urlToShortGithubUrl(value) {
|
|
7
|
+
return value?.replaceAll(/(git@github\.com:)|(https:\/\/github\.com\/)|(\.git)/gi, '') ?? '';
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function getOwnerFromUrl(url) {
|
|
11
|
+
return urlToShortGithubUrl(url).split('/')[0] ?? '';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function getRepoFromUrl(url) {
|
|
15
|
+
return urlToShortGithubUrl(url).split('/')[1] ?? '';
|
|
16
|
+
}
|
|
17
|
+
-%>
|
|
5
18
|
name: Merge development branch to main branch
|
|
6
19
|
|
|
7
20
|
on: [workflow_dispatch]
|
|
@@ -51,3 +64,13 @@ jobs:
|
|
|
51
64
|
run: |
|
|
52
65
|
git merge <%- getDevelopmentBranch(workspace) %> --no-verify
|
|
53
66
|
git push -u origin <%- getMainBranch(workspace) %> --no-verify
|
|
67
|
+
|
|
68
|
+
- name: Trigger release
|
|
69
|
+
run: |
|
|
70
|
+
curl -L \
|
|
71
|
+
-X POST \
|
|
72
|
+
-H "Accept: application/vnd.github+json" \
|
|
73
|
+
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
|
74
|
+
-H "X-GitHub-Api-Version: 2022-11-28" \
|
|
75
|
+
https://api.github.com/repos/<%- getOwnerFromUrl(workspace.repository?.url) %>/<%- getRepoFromUrl(workspace.repository?.url) %>/actions/workflows/release.yaml/dispatches \
|
|
76
|
+
-d '{"ref": "<%- getMainBranch(workspace) %>"}'
|
|
@@ -295,7 +295,7 @@ jobs:
|
|
|
295
295
|
|
|
296
296
|
- name: Version packages
|
|
297
297
|
run: |
|
|
298
|
-
npx changeset version --snapshot --snapshot-prerelease-template "{commit}"
|
|
298
|
+
npx changeset version --snapshot unstable --snapshot-prerelease-template "{tag}.{commit}"
|
|
299
299
|
git status
|
|
300
300
|
env:
|
|
301
301
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|