@iconicompany/imarketplacetypes 1.0.3 → 1.0.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.
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Publish main branch
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write # нужно для пуша
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish-main:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v3
|
|
18
|
+
- uses: actions/setup-node@v3
|
|
19
|
+
with:
|
|
20
|
+
node-version: 20
|
|
21
|
+
registry-url: https://registry.npmjs.org/
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: npm ci
|
|
25
|
+
|
|
26
|
+
- name: Build
|
|
27
|
+
run: npm run build
|
|
28
|
+
|
|
29
|
+
- name: Bump version
|
|
30
|
+
run: |
|
|
31
|
+
git config --global user.name "github-actions"
|
|
32
|
+
git config --global user.email "github-actions@github.com"
|
|
33
|
+
npm version patch --force
|
|
34
|
+
|
|
35
|
+
- name: Publish to NPM
|
|
36
|
+
run: npm publish --access public
|
|
37
|
+
env:
|
|
38
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
39
|
+
|
|
40
|
+
- name: Commit and push
|
|
41
|
+
run: |
|
|
42
|
+
git push
|
package/package.json
CHANGED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
name: Publish Snapshot to NPM
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main # можешь заменить на любую ветку
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
publish-snapshot:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@v3
|
|
14
|
-
|
|
15
|
-
- uses: actions/setup-node@v3
|
|
16
|
-
with:
|
|
17
|
-
node-version: 20
|
|
18
|
-
registry-url: https://registry.npmjs.org/
|
|
19
|
-
|
|
20
|
-
# Генерация snapshot-версии
|
|
21
|
-
- name: Generate snapshot version
|
|
22
|
-
id: snapshot
|
|
23
|
-
run: |
|
|
24
|
-
SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-8)
|
|
25
|
-
TIMESTAMP=$(date +%Y%m%d%H%M%S)
|
|
26
|
-
VERSION="0.0.0-snapshot.${TIMESTAMP}.${SHORT_SHA}"
|
|
27
|
-
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
|
|
28
|
-
|
|
29
|
-
# Обновляем version в package.json
|
|
30
|
-
- name: Update package.json version
|
|
31
|
-
run: |
|
|
32
|
-
VERSION=${{ steps.snapshot.outputs.VERSION }}
|
|
33
|
-
jq ".version = \"$VERSION\"" package.json > package.tmp.json
|
|
34
|
-
mv package.tmp.json package.json
|
|
35
|
-
|
|
36
|
-
- run: npm ci
|
|
37
|
-
|
|
38
|
-
- run: npm run build
|
|
39
|
-
|
|
40
|
-
- name: Publish snapshot
|
|
41
|
-
run: npm publish --tag snapshot --access public
|
|
42
|
-
env:
|
|
43
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
44
|
-
|