Skip to content

Commit 63a7abd

Browse files
Merge pull request #11 from AndreaPontrandolfo/AndreaPontrandolfo/issue6
feat(ci): Setup automatic releases and publishing
2 parents 9d88510 + d185746 commit 63a7abd

File tree

4 files changed

+1519
-5
lines changed

4 files changed

+1519
-5
lines changed

.github/workflows/release.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
permissions:
8+
contents: read # for checkout
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write # to be able to publish a GitHub release
16+
issues: write # to be able to comment on released issues
17+
pull-requests: write # to be able to comment on released pull requests
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
- name: Pnpm Setup
22+
uses: pnpm/action-setup@v4
23+
with:
24+
version: 8
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: "lts/*"
29+
cache: "pnpm"
30+
- name: Install dependencies
31+
run: pnpm install
32+
- name: Release
33+
run: pnpm semantic-release
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pids
1212
logs
1313
reports
1414
build
15+
dist
1516
node_modules
1617
npm-debug.log
1718
sftp-config.json

package.json

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "eslint-plugin-remeda",
3-
"version": "0.0.0",
3+
"version": "0.0.0-development",
44
"author": "Andrea Pontrandolfo <[email protected]>",
55
"description": "ESLint plugin for Remeda library.",
6+
"type": "commonjs",
67
"main": "src/index.js",
78
"scripts": {
89
"coveralls": "nyc report --reporter=text-lcov | coveralls",
910
"knip": "knip",
11+
"publint": "publint",
1012
"test": "npm run unit-test",
1113
"unit-test": "cross-env nyc mocha \"tests/**/*.js\" --reporter=dot",
12-
"patch": "npm version patch -m\"update version to %s\" && git push --follow-tags",
13-
"minor": "npm version minor -m\"update version to %s\" && git push --follow-tags",
14-
"major": "npm version major -m\"update version to %s\" && git push --follow-tags"
14+
"semantic-release": "semantic-release"
1515
},
1616
"files": [
1717
"README.md",
@@ -42,10 +42,12 @@
4242
"mocha": "^9.2.2",
4343
"nyc": "^15.1.0",
4444
"prettier": "^3.3.2",
45+
"publint": "^0.2.8",
46+
"semantic-release": "^24.0.0",
4547
"typescript": "^5.5.2"
4648
},
4749
"engines": {
48-
"node": ">=12"
50+
"node": ">=20"
4951
},
5052
"keywords": [
5153
"eslint",

0 commit comments

Comments
 (0)