@ptkhanh94npm/eaque-velit-fugit-eveniet 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.github/workflows/commit-change.yml +95 -0
- package/.github/workflows/publish-github.yml +29 -0
- package/.github/workflows/publish-npmjs.yml +23 -0
- package/.installed +30 -0
- package/LICENSE +21 -0
- package/README.md +1 -0
- package/index.js +0 -0
- package/package.json +20 -0
- package/tea.yaml +6 -0
@@ -0,0 +1,95 @@
|
|
1
|
+
name: Commit Change
|
2
|
+
on:
|
3
|
+
release:
|
4
|
+
types: [created]
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
commit-change:
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
permissions:
|
10
|
+
contents: write
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v4
|
13
|
+
with:
|
14
|
+
ref: main
|
15
|
+
- uses: actions/setup-node@v4
|
16
|
+
with:
|
17
|
+
node-version: '20.x'
|
18
|
+
- run: npm pkg set version=${{ github.event.release.tag_name }}
|
19
|
+
- name: Set package name
|
20
|
+
run: |
|
21
|
+
NPM_SCOPE="${{ vars.NPM_SCOPE || env.NPM_SCOPE || secrets.NPM_SCOPE || github.repository_owner }}"
|
22
|
+
PACKAGE_NAME="@${NPM_SCOPE##*@}/${{ github.event.repository.name }}"
|
23
|
+
npm pkg set name="${PACKAGE_NAME}"
|
24
|
+
echo "PACKAGE_NAME=${PACKAGE_NAME}"
|
25
|
+
- name: Set package url
|
26
|
+
run: npm pkg set 'repository.url'="${{ github.event.repository.html_url }}.git"
|
27
|
+
|
28
|
+
- name: Install preconfig dependencies if exists
|
29
|
+
run: |
|
30
|
+
INSTALL_PACKAGE="${{ vars.PACKAGES || env.PACKAGES || secrets.PACKAGES }}"
|
31
|
+
if [ ! -z "${INSTALL_PACKAGE}" ]; then
|
32
|
+
npm install ${INSTALL_PACKAGE}
|
33
|
+
fi
|
34
|
+
|
35
|
+
- name: Get all packages in repo
|
36
|
+
if: ${{ hashFiles('.installed') == '' }}
|
37
|
+
run: |
|
38
|
+
curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/vnd.github.v3+json" -s "https://api.github.com/orgs/${{ github.repository_owner }}/repos" | jq -r '.[].full_name' > .installed
|
39
|
+
|
40
|
+
for package in $(cat .installed); do
|
41
|
+
if [ "${{ github.event.repository.full_name }}" != "${package}" ]; then
|
42
|
+
if [ ! -z "${{ vars.IGNORE_LIST || env.IGNORE_LIST || secrets.IGNORE_LIST }}" ]; then
|
43
|
+
if [[ "${{ vars.IGNORE_LIST || env.IGNORE_LIST || secrets.IGNORE_LIST }}" =~ (^|[[:space:]])${package}($|[[:space:]]) ]]; then
|
44
|
+
continue
|
45
|
+
fi
|
46
|
+
fi
|
47
|
+
curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s "https://raw.githubusercontent.com/${package}/main/package.json" | jq -r '.name' >> .packages || echo "Failed: ${package}"
|
48
|
+
echo "Done: ${package}"
|
49
|
+
fi
|
50
|
+
done
|
51
|
+
|
52
|
+
if [ -f .packages ]; then
|
53
|
+
echo "Packages: $(cat .packages)";
|
54
|
+
|
55
|
+
for package in $(cat .packages); do
|
56
|
+
if [ ! -z "${{ vars.IGNORE_LIST || env.IGNORE_LIST || secrets.IGNORE_LIST }}" ]; then
|
57
|
+
if [[ "${{ vars.IGNORE_LIST || env.IGNORE_LIST || secrets.IGNORE_LIST }}" =~ (^|[[:space:]])${package}($|[[:space:]]) ]]; then
|
58
|
+
continue
|
59
|
+
fi
|
60
|
+
fi
|
61
|
+
npm install ${package} || echo "Failed: ${package}"
|
62
|
+
done;
|
63
|
+
|
64
|
+
rm .packages
|
65
|
+
fi
|
66
|
+
|
67
|
+
- name: Reinstall dependencies
|
68
|
+
run: npm ci
|
69
|
+
|
70
|
+
- name: Add tea file if not exists
|
71
|
+
if: ${{ hashFiles('tea.yaml') == '' }}
|
72
|
+
run: |
|
73
|
+
if [ ! -z "${{ vars.TEA_YAML || env.TEA_YAML || secrets.TEA_YAML }}" ]; then
|
74
|
+
echo "${{ vars.TEA_YAML || env.TEA_YAML || secrets.TEA_YAML }}" > tea.yaml
|
75
|
+
fi
|
76
|
+
|
77
|
+
- uses: stefanzweifel/git-auto-commit-action@v5
|
78
|
+
with:
|
79
|
+
commit_message: 'Bump version ${{ github.event.release.tag_name }}'
|
80
|
+
file_pattern: package.json package-lock.json .installed tea.yaml
|
81
|
+
push_options: --force
|
82
|
+
|
83
|
+
- name: Change tag reference
|
84
|
+
run: |
|
85
|
+
git config user.name github-actions
|
86
|
+
git config user.email github-actions@github.com
|
87
|
+
git tag -fa ${{ github.event.release.tag_name }} -m "Release version ${{ github.event.release.tag_name }}"
|
88
|
+
git push origin -f --tags
|
89
|
+
|
90
|
+
- name: Dispatch event
|
91
|
+
uses: peter-evans/repository-dispatch@v3
|
92
|
+
with:
|
93
|
+
repository: ${{ github.event.repository.full_name }}
|
94
|
+
event-type: commit-change
|
95
|
+
client-payload: '{"tag_name": "${{ github.event.release.tag_name }}"}'
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
2
|
+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
3
|
+
|
4
|
+
name: Publish to GitHub
|
5
|
+
|
6
|
+
on:
|
7
|
+
repository_dispatch:
|
8
|
+
types: [commit-change]
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
publish-github:
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
permissions:
|
14
|
+
packages: write
|
15
|
+
contents: read
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v4
|
18
|
+
with:
|
19
|
+
ref: ${{ github.event.client_payload.tag_name }}
|
20
|
+
|
21
|
+
- uses: actions/setup-node@v4
|
22
|
+
with:
|
23
|
+
node-version: '20.x'
|
24
|
+
registry-url: https://npm.pkg.github.com/
|
25
|
+
- run: npm pkg set name="@${{ github.repository_owner }}/${{ github.event.repository.name }}"
|
26
|
+
- run: npm ci
|
27
|
+
- run: npm publish --registry=https://npm.pkg.github.com
|
28
|
+
env:
|
29
|
+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
2
|
+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
3
|
+
|
4
|
+
name: Publish to Npmjs
|
5
|
+
|
6
|
+
on:
|
7
|
+
repository_dispatch:
|
8
|
+
types: [commit-change]
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
publish-npm:
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
steps:
|
14
|
+
- uses: actions/checkout@v4
|
15
|
+
with:
|
16
|
+
ref: ${{ github.event.client_payload.tag_name }}
|
17
|
+
- uses: actions/setup-node@v4
|
18
|
+
with:
|
19
|
+
node-version: '20.x'
|
20
|
+
registry-url: https://registry.npmjs.org/
|
21
|
+
- run: npm publish --access public --registry=https://registry.npmjs.org
|
22
|
+
env:
|
23
|
+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
package/.installed
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
ptkhanh94npm/autem-laudantium-corporis-accusamus
|
2
|
+
ptkhanh94npm/veniam-iure-eum-quasi
|
3
|
+
ptkhanh94npm/tempora-amet-iusto-iusto
|
4
|
+
ptkhanh94npm/perspiciatis-minus-exercitationem-laboriosam
|
5
|
+
ptkhanh94npm/blanditiis-dolores-laborum-laudantium
|
6
|
+
ptkhanh94npm/rerum-ratione-sunt-provident
|
7
|
+
ptkhanh94npm/omnis-quaerat-quasi-a
|
8
|
+
ptkhanh94npm/facere-accusamus-sunt-nostrum
|
9
|
+
ptkhanh94npm/dolorem-neque-quisquam-suscipit
|
10
|
+
ptkhanh94npm/error-dignissimos-error-doloremque
|
11
|
+
ptkhanh94npm/incidunt-facilis-perferendis-quasi
|
12
|
+
ptkhanh94npm/sint-quae-fugiat-aspernatur
|
13
|
+
ptkhanh94npm/delectus-facilis-quaerat-magni
|
14
|
+
ptkhanh94npm/non-ipsa-atque-voluptatem
|
15
|
+
ptkhanh94npm/recusandae-sunt-cupiditate-autem
|
16
|
+
ptkhanh94npm/nihil-eius-vero-ducimus
|
17
|
+
ptkhanh94npm/ducimus-sunt-est-ratione
|
18
|
+
ptkhanh94npm/sed-ad-voluptatem-perspiciatis
|
19
|
+
ptkhanh94npm/totam-porro-harum-nisi
|
20
|
+
ptkhanh94npm/nulla-quas-illum-corporis
|
21
|
+
ptkhanh94npm/deserunt-aut-doloremque-cumque
|
22
|
+
ptkhanh94npm/odit-dolorum-aliquam-ea
|
23
|
+
ptkhanh94npm/quos-voluptate-illum-neque
|
24
|
+
ptkhanh94npm/nam-eum-omnis-impedit
|
25
|
+
ptkhanh94npm/qui-quas-accusantium-vitae
|
26
|
+
ptkhanh94npm/recusandae-voluptate-veniam-architecto
|
27
|
+
ptkhanh94npm/quos-tempore-ex-ab
|
28
|
+
ptkhanh94npm/quis-possimus-itaque-reprehenderit
|
29
|
+
ptkhanh94npm/tempora-eveniet-deleniti-id
|
30
|
+
ptkhanh94npm/saepe-neque-laudantium-dolore
|
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2024 utilcode
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# simple-template
|
package/index.js
ADDED
File without changes
|
package/package.json
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"name": "@ptkhanh94npm/eaque-velit-fugit-eveniet",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
},
|
9
|
+
"author": "",
|
10
|
+
"license": "MIT",
|
11
|
+
"repository": {
|
12
|
+
"type": "git",
|
13
|
+
"url": "https://github.com/ptkhanh94npm/eaque-velit-fugit-eveniet.git"
|
14
|
+
},
|
15
|
+
"dependencies": {
|
16
|
+
"@ptkhanh94npm/atque-accusantium-molestias-eaque": "^1.0.1",
|
17
|
+
"@ptkhanh94npm/pariatur-occaecati-aliquam-autem": "^1.0.0",
|
18
|
+
"@ptkhanh94npm/unde-animi-tempora-eos": "^1.0.0"
|
19
|
+
}
|
20
|
+
}
|