eslint-config-lapikit 0.0.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/.github/workflows/release.yml +96 -0
- package/.github/workflows/tag.yml +43 -0
- package/LICENSE +21 -0
- package/README.md +1 -0
- package/index.js +3 -0
- package/package.json +13 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
name: Public Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
id-token: write
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
env:
|
|
12
|
+
NODE_VERSION: "lts/*"
|
|
13
|
+
BUN_VERSION: "latest"
|
|
14
|
+
RELEASE_CHANNEL: public
|
|
15
|
+
PACKAGE_NAME: eslint-config-lapikit
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
prerelease:
|
|
19
|
+
name: Check Version
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
timeout-minutes: 1
|
|
22
|
+
outputs:
|
|
23
|
+
should_publish: ${{ steps.check.outputs.should_publish }}
|
|
24
|
+
version_release: ${{ steps.get_version.outputs.version_release }}
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
|
|
28
|
+
- name: get local package version
|
|
29
|
+
id: get_version
|
|
30
|
+
run: |
|
|
31
|
+
echo "PACKAGE_VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV
|
|
32
|
+
echo "version_release=$PACKAGE_VERSION" >> $GITHUB_OUTPUT
|
|
33
|
+
|
|
34
|
+
- name: check if version exists on npm
|
|
35
|
+
id: check
|
|
36
|
+
run: |
|
|
37
|
+
if npm view ${{ env.PACKAGE_NAME }}@$PACKAGE_VERSION version > /dev/null 2>&1; then
|
|
38
|
+
echo "Version $PACKAGE_VERSION already exists on NPM."
|
|
39
|
+
echo "should_publish=false" >> $GITHUB_OUTPUT
|
|
40
|
+
else
|
|
41
|
+
echo "Version $PACKAGE_VERSION is new. Valid to publish."
|
|
42
|
+
echo "should_publish=true" >> $GITHUB_OUTPUT
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
publish:
|
|
46
|
+
name: Publish
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
needs: prerelease
|
|
49
|
+
if: needs.prerelease.outputs.should_publish == 'true'
|
|
50
|
+
env:
|
|
51
|
+
version_release: ${{ needs.prerelease.outputs.version_release }}
|
|
52
|
+
timeout-minutes: 4
|
|
53
|
+
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@v4
|
|
56
|
+
with:
|
|
57
|
+
ref: ${{ github.sha }}
|
|
58
|
+
|
|
59
|
+
- name: Setup Node LTS
|
|
60
|
+
uses: actions/setup-node@v4
|
|
61
|
+
with:
|
|
62
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
63
|
+
|
|
64
|
+
- name: Setup Bun
|
|
65
|
+
uses: oven-sh/setup-bun@v2
|
|
66
|
+
with:
|
|
67
|
+
bun-version: ${{ env.BUN_VERSION }}
|
|
68
|
+
|
|
69
|
+
- name: update .npmrc
|
|
70
|
+
run: |
|
|
71
|
+
echo "engine-strict=false" > ~/.npmrc
|
|
72
|
+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
|
|
73
|
+
|
|
74
|
+
- name: set github actions bot
|
|
75
|
+
run: |
|
|
76
|
+
git config user.name "github-actions[bot]"
|
|
77
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
78
|
+
|
|
79
|
+
- name: verify package
|
|
80
|
+
run: |
|
|
81
|
+
npm pack --dry-run
|
|
82
|
+
|
|
83
|
+
- name: publish to npm
|
|
84
|
+
run: |
|
|
85
|
+
echo "Publishing version ${{ env.version_release }}"
|
|
86
|
+
npm publish --access ${{ env.RELEASE_CHANNEL }} --provenance
|
|
87
|
+
env:
|
|
88
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
89
|
+
|
|
90
|
+
generate-release-notes:
|
|
91
|
+
name: Tag
|
|
92
|
+
needs: publish
|
|
93
|
+
permissions:
|
|
94
|
+
contents: write
|
|
95
|
+
uses: ./.github/workflows/tag.yml
|
|
96
|
+
secrets: inherit
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: "Tag"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
tag-release:
|
|
8
|
+
timeout-minutes: 5
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
contents: write
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: oven-sh/setup-bun@v1.2.2
|
|
15
|
+
|
|
16
|
+
- name: install jq on env
|
|
17
|
+
run: sudo apt-get install jq
|
|
18
|
+
|
|
19
|
+
- name: install dependencies
|
|
20
|
+
run: bun install
|
|
21
|
+
|
|
22
|
+
- name: build
|
|
23
|
+
run: |
|
|
24
|
+
bun run build
|
|
25
|
+
|
|
26
|
+
- name: get package version from package.json
|
|
27
|
+
id: package-version
|
|
28
|
+
run: |
|
|
29
|
+
version=$(jq -r .version package.json)
|
|
30
|
+
echo "version=$version" >> "$GITHUB_OUTPUT"
|
|
31
|
+
|
|
32
|
+
- name: add release notes to github release
|
|
33
|
+
uses: softprops/action-gh-release@v2
|
|
34
|
+
with:
|
|
35
|
+
token: ${{ github.token }}
|
|
36
|
+
tag_name: eslint-config-lapikit@${{ steps.package-version.outputs.version }}
|
|
37
|
+
body: |
|
|
38
|
+
Install this update:
|
|
39
|
+
```bash
|
|
40
|
+
npm i -D eslint-config-lapikit@${{ steps.package-version.outputs.version }}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Thank you for using Lapikit!
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 lapikit
|
|
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
|
+
# eslint-config-lapikit
|
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "eslint-config-lapikit",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/lapikit/eslint-config-lapikit"
|
|
9
|
+
},
|
|
10
|
+
"peerDependencies": {
|
|
11
|
+
"lapikit": ">=0.5.0"
|
|
12
|
+
}
|
|
13
|
+
}
|