Skip to content

Commit 49686d1

Browse files
Merge pull request #95 from cabify/create-action-to-publish-canary
create workflow to create canary
2 parents dd3eb31 + d5ab905 commit 49686d1

3 files changed

Lines changed: 6 additions & 14 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,11 @@
44
name: Publish package
55

66
on:
7-
workflow_run:
8-
workflows: ['Tests']
9-
branches: [main]
10-
types:
11-
- completed
12-
push:
13-
branches:
14-
- '!*'
15-
tags:
16-
- 'v*'
7+
release:
8+
types: [created]
179

1810
jobs:
1911
publish-npm:
20-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
2112
runs-on: ubuntu-latest
2213
steps:
2314
- uses: actions/checkout@v2
@@ -28,4 +19,5 @@ jobs:
2819
- run: yarn install
2920
- uses: JS-DevTools/npm-publish@v1
3021
with:
22+
tag: ${{ contains(github.ref_name,'beta') && 'beta' || 'latest' }}
3123
token: ${{ secrets.NPM_TOKEN }}

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
name: Tests
55

6-
on: [push, pull_request]
6+
on: [push]
77

88
jobs:
99
test:

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@cabify/prom-react",
33
"description": "Add Prometheus metrics to your React App",
4-
"version": "0.1.3",
4+
"version": "0.1.9-beta.2",
55
"author": "Cabify",
66
"license": "Apache-2.0",
77
"main": "./dist/index.js",
@@ -22,7 +22,7 @@
2222
"publish:major": "npm version major",
2323
"publish:minor": "npm version minor",
2424
"publish:patch": "npm version patch",
25-
"publish:canary": "npm version prerelease",
25+
"publish:canary": "npm version prerelease --preid=beta",
2626
"test": "jest",
2727
"test:ci": "jest",
2828
"typecheck": "tsc --project tsconfig.eslint.json"

0 commit comments

Comments
 (0)