@daiyam/artifact-vsx-ts 0.9.5 → 0.9.6
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.
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
name: Preview
|
|
2
|
+
|
|
2
3
|
on:
|
|
3
|
-
workflow_dispatch:
|
|
4
|
+
workflow_dispatch: {}
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: write # Release
|
|
8
|
+
|
|
4
9
|
jobs:
|
|
5
10
|
publish:
|
|
6
11
|
runs-on: ubuntu-latest
|
|
12
|
+
environment: release
|
|
7
13
|
steps:
|
|
8
14
|
- name: Checkout code
|
|
9
|
-
uses: actions/checkout@v6
|
|
15
|
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
10
16
|
with:
|
|
11
17
|
fetch-depth: 0
|
|
18
|
+
persist-credentials: false
|
|
19
|
+
|
|
12
20
|
- name: Get Version
|
|
13
21
|
run: |
|
|
14
22
|
# Get the latest tag
|
|
@@ -20,10 +28,13 @@ jobs:
|
|
|
20
28
|
fi
|
|
21
29
|
echo "VERSION=$LATEST_TAG" >> $GITHUB_ENV
|
|
22
30
|
echo "Using version: $LATEST_TAG"
|
|
31
|
+
|
|
23
32
|
- name: Setup Node.js
|
|
24
|
-
uses: actions/setup-node@v6
|
|
33
|
+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
25
34
|
with:
|
|
26
|
-
node-version-file:
|
|
35
|
+
node-version-file: .nvmrc
|
|
36
|
+
package-manager-cache: false
|
|
37
|
+
|
|
27
38
|
- name: Update package.json
|
|
28
39
|
run: |
|
|
29
40
|
TIME_PATCH="$(date +%-y)$(printf "%04d" $(($(date +%-j) * 24 + $(date +%-H))))"
|
|
@@ -36,6 +47,7 @@ jobs:
|
|
|
36
47
|
jq -r '"version: \(.version)\npreview: \(.preview)"' package.json
|
|
37
48
|
|
|
38
49
|
echo "RELEASE_TAG=v$VERSION" >> $GITHUB_ENV
|
|
50
|
+
|
|
39
51
|
- name: Build
|
|
40
52
|
run: |
|
|
41
53
|
npm ci
|
|
@@ -46,8 +58,9 @@ jobs:
|
|
|
46
58
|
echo "VSIX_NAME=$VSIX_NAME" >> $GITHUB_ENV
|
|
47
59
|
echo "CHECKSUM=$CHECKSUM" >> $GITHUB_ENV
|
|
48
60
|
echo "$CHECKSUM" > "$VSIX_NAME.sha256"
|
|
61
|
+
|
|
49
62
|
- name: Release
|
|
50
|
-
uses: softprops/action-gh-release@v2
|
|
63
|
+
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
|
|
51
64
|
with:
|
|
52
65
|
files: |
|
|
53
66
|
${{ env.VSIX_NAME }}
|
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
name: Publish Extension
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
workflow_dispatch:
|
|
4
|
+
workflow_dispatch: {}
|
|
5
5
|
push:
|
|
6
6
|
tags:
|
|
7
|
-
-
|
|
7
|
+
- v*
|
|
8
8
|
|
|
9
9
|
env:
|
|
10
10
|
PUBLISH_OPENVSX: ${{ vars.PUBLISH_OPENVSX }}
|
|
11
11
|
PUBLISH_VSCODE: ${{ vars.PUBLISH_VSCODE }}
|
|
12
12
|
|
|
13
|
+
permissions:
|
|
14
|
+
contents: write # Release
|
|
15
|
+
|
|
13
16
|
jobs:
|
|
14
17
|
publish:
|
|
15
18
|
runs-on: ubuntu-latest
|
|
19
|
+
environment: release
|
|
16
20
|
steps:
|
|
17
21
|
- name: Checkout code
|
|
18
|
-
uses: actions/checkout@v6
|
|
22
|
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
19
23
|
with:
|
|
20
24
|
fetch-depth: 0
|
|
25
|
+
persist-credentials: false
|
|
21
26
|
|
|
22
27
|
- name: Get Version
|
|
23
28
|
run: |
|
|
@@ -33,7 +38,7 @@ jobs:
|
|
|
33
38
|
- name: Check Existing Release
|
|
34
39
|
run: |
|
|
35
40
|
# Try to get the release information
|
|
36
|
-
RELEASE_INFO=$(gh release view ${
|
|
41
|
+
RELEASE_INFO=$(gh release view ${VERSION} --json assets,url 2>/dev/null || echo "")
|
|
37
42
|
if [ ! -z "$RELEASE_INFO" ]; then
|
|
38
43
|
echo "Release exists"
|
|
39
44
|
echo "RELEASE_EXISTS=yes" >> $GITHUB_ENV
|
|
@@ -53,16 +58,17 @@ jobs:
|
|
|
53
58
|
- name: Download Existing VSIX
|
|
54
59
|
if: env.RELEASE_EXISTS == 'yes' && env.VSIX_URL != ''
|
|
55
60
|
run: |
|
|
56
|
-
gh api ${
|
|
57
|
-
echo "CHECKSUM=$(sha256sum ${
|
|
61
|
+
gh api ${VSIX_URL} --header 'Accept: application/octet-stream' > ${VSIX_NAME}
|
|
62
|
+
echo "CHECKSUM=$(sha256sum ${VSIX_NAME} | cut -d ' ' -f 1)" >> $GITHUB_ENV
|
|
58
63
|
env:
|
|
59
64
|
GH_TOKEN: ${{ github.token }}
|
|
60
65
|
|
|
61
66
|
- name: Setup Node.js
|
|
62
67
|
if: env.RELEASE_EXISTS == 'no'
|
|
63
|
-
uses: actions/setup-node@v6
|
|
68
|
+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
64
69
|
with:
|
|
65
|
-
node-version:
|
|
70
|
+
node-version-file: .nvmrc
|
|
71
|
+
package-manager-cache: false
|
|
66
72
|
|
|
67
73
|
- name: Build
|
|
68
74
|
if: env.RELEASE_EXISTS == 'no'
|
|
@@ -79,7 +85,7 @@ jobs:
|
|
|
79
85
|
- name: Get Changelog
|
|
80
86
|
if: env.RELEASE_EXISTS == 'no'
|
|
81
87
|
run: |
|
|
82
|
-
CHANGELOG_ENTRY=$(node .github/scripts/get-changelog.js ${
|
|
88
|
+
CHANGELOG_ENTRY=$(node .github/scripts/get-changelog.js ${VERSION})
|
|
83
89
|
# Properly handle multiline output in GitHub Actions
|
|
84
90
|
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
|
|
85
91
|
echo "CHANGELOG_ENTRY<<$EOF" >> $GITHUB_ENV
|
|
@@ -88,7 +94,7 @@ jobs:
|
|
|
88
94
|
|
|
89
95
|
- name: Release
|
|
90
96
|
if: env.RELEASE_EXISTS == 'no'
|
|
91
|
-
uses: softprops/action-gh-release@v2
|
|
97
|
+
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
|
|
92
98
|
with:
|
|
93
99
|
files: |
|
|
94
100
|
${{ env.VSIX_NAME }}
|
|
@@ -113,7 +119,7 @@ jobs:
|
|
|
113
119
|
|
|
114
120
|
- name: Publish to Open VSX Registry
|
|
115
121
|
if: env.PUBLISH_OPENVSX == 'yes'
|
|
116
|
-
uses: HaaLeo/publish-vscode-extension@v2
|
|
122
|
+
uses: HaaLeo/publish-vscode-extension@ca5561daa085dee804bf9f37fe0165785a9b14db # v2.0.0
|
|
117
123
|
with:
|
|
118
124
|
extensionFile: ${{ env.VSIX_NAME }}
|
|
119
125
|
pat: ${{ secrets.TOKEN_OPENVSX }}
|
|
@@ -121,7 +127,7 @@ jobs:
|
|
|
121
127
|
|
|
122
128
|
- name: Publish to Visual Studio Code Marketplace
|
|
123
129
|
if: env.PUBLISH_VSCODE == 'yes'
|
|
124
|
-
uses: HaaLeo/publish-vscode-extension@v2
|
|
130
|
+
uses: HaaLeo/publish-vscode-extension@ca5561daa085dee804bf9f37fe0165785a9b14db # v2.0.0
|
|
125
131
|
with:
|
|
126
132
|
extensionFile: ${{ env.VSIX_NAME }}
|
|
127
133
|
pat: ${{ secrets.TOKEN_VSCODE }}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daiyam/artifact-vsx-ts",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"description": "The configuration to create Visual Studio extensions and publish them on Visual Studio Marketplace and Open VSX Registry.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Baptiste Augrain",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"project-template",
|
|
32
32
|
"scaffold"
|
|
33
33
|
],
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "6c3e6970d79755e6a60f51a0653fc66702973eb2"
|
|
35
35
|
}
|