Skip to content

Commit

Permalink
Enable GitHub actions (#2)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha authored Jul 3, 2020
1 parent ea644a4 commit 2b7ea0b
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/.kodiak.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version = 1

[merge]
method = "squash" # default: "merge"
delete_branch_on_merge = true # default: false
optimistic_updates = true # default: true
prioritize_ready_to_merge = true # default: false

[merge.message]
title = "pull_request_title" # default: "github_default"
body = "github_default" # default: "github_default"
strip_html_comments = true # default: false

[update]
always = true # default: false

[approve]
auto_approve_usernames = ["1gtm", "tamalsaha"]
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

on:
pull_request:
branches:
- "*"
push:
branches:
- master

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

steps:
- uses: actions/checkout@v1

- name: Use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 10.x

- name: Build
env:
CI: true
run: |
npm ci
npm run build
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on:
push:
tags:
- "*.*"

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x

- name: Build
run: |
npm ci
npm run build
- name: Publish
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" >> ~/.npmrc
npm --no-git-tag-version --allow-same-version version ${GITHUB_REF#"refs/tags/"}
npm publish --access public

0 comments on commit 2b7ea0b

Please sign in to comment.