Skip to content

Commit fee293e

Browse files
SergeAstapovwebark
authored andcommitted
Add release GitHub action
1 parent 56e8e12 commit fee293e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches:
66
- main
77
- master
8+
tags:
9+
- v*
810
pull_request: {}
911

1012
concurrency:
@@ -76,3 +78,28 @@ jobs:
7678
run: yarn install --frozen-lockfile
7779
- name: Run Tests
7880
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
81+
82+
publish:
83+
name: Publish
84+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
85+
runs-on: ubuntu-latest
86+
needs: 'test'
87+
88+
steps:
89+
- name: Checkout
90+
uses: actions/checkout@v2
91+
- name: Install Node
92+
uses: actions/setup-node@v2
93+
with:
94+
node-version: 12.x
95+
cache: yarn
96+
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
97+
registry-url: 'https://registry.npmjs.org'
98+
99+
- name: Install Dependencies
100+
run: yarn install --frozen-lockfile
101+
102+
- name: Publish to npm
103+
run: npm publish
104+
env:
105+
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

0 commit comments

Comments
 (0)