Skip to content

Commit

Permalink
CI add github actions to publish to npm and gpr
Browse files Browse the repository at this point in the history
  • Loading branch information
benabel committed Jun 10, 2020
1 parent e506cbe commit 4832e9c
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/publish-gpr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# https://github.com/actions/create-release
# Create a release if a tag matching v* is pushed

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Create Release

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Create Release in github
id: create_release_gpr
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
19 changes: 19 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish to npm
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v1
with:
registry-url: 'https://registry.npmjs.org'
- run: yarn
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 4832e9c

Please sign in to comment.