Skip to content

Commit 14e1cdb

Browse files
fix(github): add beta workflow
1 parent d8da381 commit 14e1cdb

File tree

1 file changed

+97
-0
lines changed

1 file changed

+97
-0
lines changed

.github/workflows/beta.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Beta
2+
on:
3+
push:
4+
branches:
5+
- beta
6+
7+
jobs:
8+
install:
9+
if: "!contains(github.event.head_commit.message, 'skip ci')"
10+
name: Install
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest]
16+
node: [16]
17+
18+
steps:
19+
- uses: actions/setup-node@v2
20+
with:
21+
node-version: ${{ matrix.node }}
22+
- name: Checkout Repo
23+
uses: actions/checkout@v2
24+
- name: cache node_modules
25+
uses: actions/cache@v2
26+
id: cache
27+
with:
28+
path: |
29+
node_modules
30+
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
31+
- name: Install Dependencies
32+
if: steps.cache.outputs.cache-hit != 'true'
33+
run: npm ci
34+
- name: Test
35+
run: npm run test
36+
37+
build:
38+
name: Build
39+
needs: install
40+
runs-on: ${{ matrix.os }}
41+
42+
strategy:
43+
matrix:
44+
os: [ubuntu-latest]
45+
node: [16]
46+
47+
steps:
48+
- uses: actions/setup-node@v2
49+
with:
50+
node-version: ${{ matrix.node }}
51+
- name: Checkout Repo
52+
uses: actions/checkout@v2
53+
- name: cache node_modules
54+
uses: actions/cache@v2
55+
id: cache
56+
with:
57+
path: |
58+
node_modules
59+
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
60+
- name: Build
61+
run: |
62+
npm run build
63+
- name: Archive Production Artifact
64+
uses: actions/upload-artifact@master
65+
with:
66+
name: artifact
67+
path: build
68+
69+
semantic-version:
70+
name: Semantic Release
71+
needs: build
72+
runs-on: ${{ matrix.os }}
73+
74+
strategy:
75+
matrix:
76+
os: [ubuntu-latest]
77+
node: [16]
78+
79+
steps:
80+
- uses: actions/setup-node@v2
81+
with:
82+
node-version: ${{ matrix.node }}
83+
- name: Checkout Repo
84+
uses: actions/checkout@v2
85+
- name: Download Artifact
86+
uses: actions/download-artifact@master
87+
with:
88+
name: artifact
89+
path: build
90+
- name: Versioning
91+
env:
92+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
93+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
95+
run: |
96+
npx -p pinst -p semantic-release -p @semantic-release/git -p @semantic-release/changelog -p @semantic-release/exec -p semantic-release-github semantic-release --provider=github --debug=true
97+

0 commit comments

Comments
 (0)