Skip to content

Commit 6e03181

Browse files
author
Stephen Parente
authored
Add github action for publish and build (#978)
1 parent aa7c3a5 commit 6e03181

File tree

5 files changed

+3095
-2
lines changed

5 files changed

+3095
-2
lines changed

.github/workflows/npm-publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+
name: Publish node-rdkafka
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
publish-npm:
12+
needs: build
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
submodules: recursive
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version: 10
21+
registry-url: https://registry.npmjs.org/
22+
cache: 'npm'
23+
- run: npm ci
24+
- run: npm publish
25+
env:
26+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.github/workflows/test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+
name: Test node-rdkafka
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
pull_request:
10+
branches: [ "master" ]
11+
12+
jobs:
13+
build:
14+
strategy:
15+
matrix:
16+
# 8, 10, 12, 14, 15, 16
17+
version: [12]
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
with:
22+
submodules: recursive
23+
- uses: actions/setup-node@v3
24+
with:
25+
node-version: ${{ matrix.version }}
26+
cache: 'npm'
27+
- run: npm ci
28+
- run: npm test
29+
name: test

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Copyright (c) 2016 Blizzard Entertainment.
55

66
[https://github.com/blizzard/node-rdkafka](https://github.com/blizzard/node-rdkafka)
77

8-
[![Build Status](https://app.travis-ci.com/Blizzard/node-rdkafka.svg?branch=master)](https://app.travis-ci.com/github/Blizzard/node-rdkafka)
8+
[![Build Status](https://github.com/Blizzard/node-rdkafka/actions/workflows/test.yml/badge.svg)](https://github.com/Blizzard/node-rdkafka/actions/workflows/test.yml)
9+
910
[![npm version](https://badge.fury.io/js/node-rdkafka.svg)](https://badge.fury.io/js/node-rdkafka)
1011

1112
# Looking for Collaborators!

0 commit comments

Comments
 (0)