Skip to content

Commit 81a65d5

Browse files
committed
Set up GitHub Actions
1 parent cd1a4ba commit 81a65d5

File tree

6 files changed

+66
-13
lines changed

6 files changed

+66
-13
lines changed

.github/workflows/main.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: run-checks
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version-file: '.nvmrc'
21+
- name: Install dependencies
22+
run: npm install
23+
- name: Build
24+
run: npm run build
25+
- name: Test
26+
run: npm test
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: publish-on-tag
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
- name: Set up Node.js
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version-file: '.nvmrc'
18+
- name: Install dependencies
19+
run: npm install
20+
- name: Build
21+
run: npm run build
22+
- name: Test
23+
run: npm test
24+
- name: Publish punycode package
25+
env:
26+
NPM_TOKEN: ${{secrets.NPM_TOKEN_PUNYCODE}}
27+
run: |
28+
npm config set registry 'https://wombat-dressing-room.appspot.com/'
29+
npm config set '//wombat-dressing-room.appspot.com/:_authToken' '${NPM_TOKEN}'
30+
npm publish
31+
- name: Publish punycode.js package
32+
env:
33+
NPM_TOKEN: ${{secrets.NPM_TOKEN_PUNYCODE_JS}}
34+
run: |
35+
npm config set registry 'https://wombat-dressing-room.appspot.com/'
36+
npm config set '//wombat-dressing-room.appspot.com/:_authToken' '${NPM_TOKEN}'
37+
npm publish

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
14

.travis.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Punycode.js [![Build status](https://travis-ci.org/bestiejs/punycode.js.svg?branch=master)](https://travis-ci.org/bestiejs/punycode.js) [![Code coverage status](http://img.shields.io/codecov/c/github/bestiejs/punycode.js.svg)](https://codecov.io/gh/bestiejs/punycode.js) [![Dependency status](https://gemnasium.com/bestiejs/punycode.js.svg)](https://gemnasium.com/bestiejs/punycode.js)
1+
# Punycode.js [![punycode on npm](https://img.shields.io/npm/v/punycode)](https://www.npmjs.com/package/emoji-test-regex-pattern)
22

33
Punycode.js is a robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891).
44

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
],
4242
"scripts": {
4343
"test": "mocha tests",
44-
"prepublish": "node scripts/prepublish.js"
44+
"build": "node scripts/prepublish.js"
4545
},
4646
"devDependencies": {
4747
"codecov": "^1.0.1",

0 commit comments

Comments
 (0)