-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (65 loc) · 3.07 KB
/
main_branch.yaml
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
name: Push to main branch
on:
push:
branches:
- main
jobs:
release:
name: Release Main Branch
runs-on: ubuntu-latest
environment: alpha
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Create .npmrc
run: echo '//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}' >> .npmrc
- name: Create env file
run: |
touch .env.production
echo RELEASE=alpha >> .env.production
echo POSTHOG_KEY=${{ secrets.POSTHOG_KEY }} >> .env.production
echo POSTHOG_URL=${{ secrets.POSTHOG_URL }} >> .env.production
echo ANALYTICS_ENCRYPTION_KEY=${{ secrets.ANALYTICS_ENCRYPTION_KEY }} >> .env.production
echo ANALYTICS_ENCRYPTION_KEY_ID=${{ secrets.ANALYTICS_ENCRYPTION_KEY_ID }} >> .env.production
echo COVALENT_API_KEY=${{ secrets.COVALENT_API_KEY }} >> .env.production
echo GLACIER_URL=${{ secrets.GLACIER_URL }} >> .env.production
echo PROXY_URL=${{ secrets.PROXY_URL }} >> .env.production
echo CORE_EXTENSION_LANDING_URL=${{ secrets.CORE_EXTENSION_LANDING_URL }} >> .env.production
echo SENTRY_DSN=${{ secrets.SENTRY_DSN }} >> .env.production
echo CORE_WEB_BASE_URL=${{ secrets.CORE_WEB_BASE_URL }} >> .env.production
echo WALLET_CONNECT_PROJECT_ID=${{ secrets.WALLET_CONNECT_PROJECT_ID }} >> .env.production
echo SEEDLESS_URL=${{ secrets.SEEDLESS_URL }} >> .env.production
echo SEEDLESS_ORG_ID=${{ secrets.SEEDLESS_ORG_ID }} >> .env.production
echo GOOGLE_OAUTH_CLIENT_ID=${{ secrets.GOOGLE_OAUTH_CLIENT_ID }} >> .env.production
echo APPLE_OAUTH_CLIENT_ID=${{ secrets.APPLE_OAUTH_CLIENT_ID }} >> .env.production
echo APPLE_OAUTH_REDIRECT_URL=${{ secrets.APPLE_OAUTH_REDIRECT_URL }} >> .env.production
echo CUBESIGNER_ENV=${{ secrets.CUBESIGNER_ENV }} >> .env.production
echo SEEDLESS_FIDO_IDENTITY_URL=${{ secrets.SEEDLESS_FIDO_IDENTITY_URL }} >> .env.production
echo NEWSLETTER_BASE_URL=${{ secrets.NEWSLETTER_BASE_URL }} >> .env.production
echo NEWSLETTER_PORTAL_ID=${{ secrets.NEWSLETTER_PORTAL_ID }} >> .env.production
echo NEWSLETTER_FORM_ID=${{ secrets.NEWSLETTER_FORM_ID }} >> .env.production
- name: Install dependencies
run: yarn setup
- name: Run tests
run: yarn test
- name: Build library
run: yarn build:alpha
- name: Setup sentry-cli
run: |
curl -sL https://sentry.io/get-cli/ | bash
echo [auth] >> .sentryclirc
echo token=${{ secrets.SENTRY_AUTH_TOKEN }} >> .sentryclirc
echo [defaults] >> .sentryclirc
echo org=${{ secrets.SENTRY_ORG }} >> .sentryclirc
echo project=${{ secrets.SENTRY_PROJECT }} >> .sentryclirc
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TYPE: alpha
run: yarn run semantic-release