Skip to content

Commit

Permalink
fix(ci): add github ci
Browse files Browse the repository at this point in the history
  • Loading branch information
garrappachc committed May 23, 2022
1 parent 233f1d5 commit 0a335f9
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: build

on:
push:
branches:
- 'master'
- '*.*.*'
tags:
- '*.*.*'
pull_request:
branches:
- 'master'
- '*.*.*'

jobs:
build:
name: build
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn

- name: Install dependencies
run: yarn install --immutable

- name: Install protoc
uses: arduino/setup-protoc@v1

- name: Generate proto files
run: yarn generate-proto

- name: Build
run: yarn build
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish Package to npmjs

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: yarn
registry-url: 'https://registry.npmjs.org'
scope: '@tf2pickup-org'

- name: Install dependencies
run: yarn install --immutable

- name: Install protoc
uses: arduino/setup-protoc@v1

- name: Generate proto files
run: yarn generate-proto

- name: Build
run: yarn build

- name: Publish
run: yarn npm publish
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 0a335f9

Please sign in to comment.