Skip to content

Commit bdf2627

Browse files
authored
automate workflow for npm publish (#497)
* setup npm_publish workflow and update package.json with new repo info * refactoring npm publish workflow to reduce dependencies * npm publish to 2.9.0 * reduce npm publish workflow to publishing task only * npm publish to 2.9.0 * testing npm publish * update npm version to 2.9.0 (latest release) * enhance CONTRIBUTING.md with sentence about npm release workflow
1 parent 0883fca commit bdf2627

4 files changed

Lines changed: 28 additions & 6 deletions

File tree

.github/workflows/npm_publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
release:
3+
types: [released]
4+
jobs:
5+
publish:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
with:
10+
# "ref" specifies the branch to check out.
11+
# "github.event.release.target_commitish" is a global variable and specifies the branch the release targeted
12+
ref: ${{ github.event.release.target_commitish }}
13+
- name: Use Node.js 12
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: 12
17+
registry-url: https://registry.npmjs.org/ # Specifies the registry, this field is required!
18+
- run: npm ci
19+
- run: npm publish
20+
env:
21+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,5 @@ As an example, let's assume you have created the svgs for Redhat and Amazon Web
259259
<li>Ensure code quality is up to standard</li>
260260
<li>Upload svgs to <a href="https://icomoon.io/app/#/select">icomoon.io</a> and take a screenshot to check that it looks good.
261261
<li>Comment on the PR so maintainers don't have to manually upload icon result.</li>
262+
<li>Publishing a new release to <a href="https://www.npmjs.com/package/devicon">npm</a>; See <a href="https://github.com/devicons/devicon/issues/288">#288</a></li>
262263
</ul>

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "devicon",
3-
"version": "2.2.0",
3+
"version": "2.9.0",
44
"description": "Programming related icons collection",
55
"main": "devicon.min.css",
66
"scripts": {
@@ -10,20 +10,20 @@
1010
},
1111
"repository": {
1212
"type": "git",
13-
"url": "https://github.com/konpa/devicon.git"
13+
"url": "https://github.com/devicons/devicon.git"
1414
},
1515
"keywords": [
1616
"programming",
1717
"icons",
1818
"svg",
1919
"font"
2020
],
21-
"author": "konpa",
21+
"author": "devicons",
2222
"license": "MIT",
2323
"bugs": {
24-
"url": "https://github.com/konpa/devicon/issues"
24+
"url": "https://github.com/devicons/devicon/issues"
2525
},
26-
"homepage": "http://konpa.github.io/devicon/",
26+
"homepage": "https://devicon.dev",
2727
"devDependencies": {
2828
"gulp": "^4.0.0",
2929
"gulp-sass": "^4.1.0",

0 commit comments

Comments
 (0)