-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (51 loc) · 1.42 KB
/
release - main push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Release on "main" branch repo push
on:
push:
branches:
- 'main'
paths-ignore:
- '.github/**'
- '**/.gitignore'
- '**/.eslintrc.json'
- '**/.prettierrc.json'
- '**/*.md'
- '**/LICENSE'
jobs:
test:
runs-on: ubuntu-latest
environment: CI/CD
strategy:
matrix:
node-version: ['lts/*']
steps:
- name: Checkout
uses: actions/checkout@main
- name: Use latest pnpm
uses: pnpm/action-setup@master
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@main
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: |
pnpm install --frozen-lockfile
- name: Run e2e tests on staging
run: |
pnpm run test:e2e
release:
needs: test
runs-on: ubuntu-latest
environment: CI/CD
steps:
- name: Checkout
uses: actions/checkout@main
- name: Get latest version from package.json
id: package_version
run: echo "VERSION=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT
- name: Create tag release
uses: ncipollo/release-action@main
with:
tag: v${{ steps.package_version.outputs.VERSION }}
name: v${{ steps.package_version.outputs.VERSION }}
body: Release v${{ steps.package_version.outputs.VERSION }}