-
Notifications
You must be signed in to change notification settings - Fork 2
97 lines (78 loc) · 2.27 KB
/
release-prerelease.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Prelease Prod
on:
release:
types: [prereleased]
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
CI: true
IS_RELEASE: true
APP_STAGE: 'production'
permissions:
contents: write
id-token: write
pull-requests: write
jobs:
release-prod:
name: Release
runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.AWS_OIDC_ARN_PROD }}
role-session-name: AWS_OIDC_ARN_PROD
aws-region: ${{ secrets.AWS_REGION }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: beta
- name: Get Tag
uses: olegtarasov/get-tag@v2.1
id: tagName
with:
tagRegex: '(?<package>.*)_(?<version>.*)'
- name: Set Node
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Set Version
run: |
echo "RELEASE_VERSION=${{ steps.tagName.outputs.package }}_${{ steps.tagName.outputs.version }}" >> $GITHUB_ENV
- name: Install
run: yarn
- name: Lint
run: |
yarn lint
- name: TypeCheck
run: |
yarn check
- name: Test
run: |
yarn test --watch=false --ci --forceExit --detectOpenHandles --runInBand --passWithNoTests
- name: Package Version Bump
run: |
yarn version ${{ steps.tagName.outputs.version }}
- name: Build Lib
run: |
yarn build:dist
- name: Build Storybook
run: |
yarn build:storybook
- name: Create Pull Request For Version
uses: peter-evans/create-pull-request@v5
with:
commit_message: 'chore: bump version to ${{ steps.tagName.outputs.version }}'
title: 'chore: bump version to ${{ steps.tagName.outputs.version }}'
body: Update to version in package.json
base: beta
branch: chore/update-version-${{ steps.tagName.outputs.version }}
- name: Deploy
run: |
yarn deploy
- name: Set Publish Version
run: |
yarn version ${{ steps.tagName.outputs.version }}
- name: Publish
run: |
yarn publish --tag beta