Skip to content

Commit 8db2bd1

Browse files
committed
Added automation for publishing
1 parent 6ae7cc3 commit 8db2bd1

File tree

5 files changed

+63
-2
lines changed

5 files changed

+63
-2
lines changed

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: ['acelaya']
2+
custom: ['https://acel.me/donate']

.github/workflows/publish-release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
npm-package:
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
- uses: actions/setup-node@v1
15+
with:
16+
node-version: '16.x'
17+
registry-url: 'https://registry.npmjs.org'
18+
- run: npm ci
19+
- run: npm version ${GITHUB_REF#refs/tags/v} --git-tag-version=false
20+
- run: npm run build
21+
- run: npm publish --access public
22+
env:
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24+
25+
github-release:
26+
needs: ['npm-package']
27+
runs-on: ubuntu-20.04
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v2
31+
- name: Publish release
32+
uses: docker://antonyurchenko/git-release:latest
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
ALLOW_EMPTY_CHANGELOG: "true"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ node_modules
22
.idea
33
docker-compose.override.yml
44
home
5+
dist

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org).
66

7+
## [2.0.2] - 2022-05-12
8+
#### Added
9+
* Added automation publishing pipeline
10+
11+
#### Changed
12+
* *Nothing*
13+
14+
#### Deprecated
15+
* *Nothing*
16+
17+
#### Removed
18+
* *Nothing*
19+
20+
#### Fixed
21+
* *Nothing*
22+
23+
724
## [2.0.1] - 2022.03-26
825
#### Added
926
* *Nothing*

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@shlinkio/eslint-config-js-coding-standard",
33
"version": "2.0.1",
44
"description": "Coding standard used by shlink JavaScript projects",
5-
"main": "index.js",
5+
"main": "dist/index.js",
66
"repository": {
77
"type": "git",
88
"url": "git+https://github.com/shlinkio/js-coding-standard.git"
@@ -19,6 +19,9 @@
1919
"url": "https://github.com/shlinkio/js-coding-standard/issues"
2020
},
2121
"homepage": "https://github.com/shlinkio/js-coding-standard",
22+
"scripts": {
23+
"build": "mkdir -p dist && rm -rf dist/* && cp index.js dist"
24+
},
2225
"dependencies": {
2326
"@typescript-eslint/eslint-plugin": "^5.16.0",
2427
"@typescript-eslint/parser": "^5.16.0",
@@ -31,5 +34,8 @@
3134
"devDependencies": {
3235
"eslint": "^8.12.0",
3336
"typescript": "^4.6.3"
34-
}
37+
},
38+
"files": [
39+
"dist"
40+
]
3541
}

0 commit comments

Comments
 (0)