-
-
Notifications
You must be signed in to change notification settings - Fork 197
93 lines (86 loc) · 3.17 KB
/
nightly.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
name: Nightly beta release
on:
schedule:
- cron: "0 16 * * *"
workflow_dispatch:
# Needed permissions for changesets
permissions:
contents: write
id-token: write
jobs:
# install dependencies and store artifact
release:
name: Prepare figma plugin
environment:
name: beta
runs-on: ubuntu-22.04
steps:
# Pull secrets from vault
- name: Import Secrets
id: secrets
uses: hashicorp/vault-action@v2
with:
url: ${{ vars.VAULT_URL }}
role: ${{ vars.VAULT_ROLE }}_beta
method: jwt
namespace: admin
secrets: |
${{ vars.VAULT_PATH }} MIXPANEL_ACCESS_TOKEN | MIXPANEL_ACCESS_TOKEN;
${{ vars.VAULT_PATH }} STORYBLOK_ACCESS_TOKEN | STORYBLOK_ACCESS_TOKEN;
${{ vars.VAULT_PATH }} SUPABASE_ANON_KEY | SUPABASE_ANON_KEY;
${{ vars.VAULT_PATH }} SENTRY_AUTH_TOKEN | SENTRY_AUTH_TOKEN;
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '20.x'
cache: yarn
cache-dependency-path: '**/yarn.lock'
- name: Install dependencies
run: yarn --frozen-lockfile --immutable
# Generate the expected env file
- name: Make envfile
uses: SpicyPizza/[email protected]
with:
file_name: packages/tokens-studio-for-figma/.env.production
envkey_ENVIRONMENT: beta
envkey_LICENSE_API_URL: ${{ vars.LICENSE_API_URL }}
envkey_SECOND_SCREEN_APP_URL: ${{ vars.SECOND_SCREEN_APP_URL }}
envkey_LAUNCHDARKLY_SDK_CLIENT: ${{ steps.secrets.outputs.LAUNCHDARKLY_SDK_CLIENT }}
envkey_TOKEN_FLOW_APP_URL: ${{ vars.TOKEN_FLOW_APP_URL }}
envkey_SENTRY_DSN: ${{ vars.SENTRY_DSN }}
envkey_SENTRY_ORG: ${{ vars.SENTRY_ORG }}
envkey_SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
envkey_SUPABASE_URL: ${{ vars.SUPABASE_URL }}
envkey_MIXPANEL_ACCESS_TOKEN: ${{ steps.secrets.outputs.MIXPANEL_ACCESS_TOKEN }}
envkey_STORYBLOK_ACCESS_TOKEN: ${{ steps.secrets.outputs.STORYBLOK_ACCESS_TOKEN }}
envkey_SUPABASE_ANON_KEY: ${{ steps.secrets.outputs.SUPABASE_ANON_KEY }}
envkey_SENTRY_AUTH_TOKEN: ${{ steps.secrets.outputs.SENTRY_AUTH_TOKEN }}
# Build the figma plugin package
- name: Build Package
run: npm run build
# Create the bundle for Figma
- name: Bundle
run: npm run bundle
# Store artifact
- name: Store Artifact
id: store_artifact
uses: actions/upload-artifact@v4
with:
name: figma-plugin
path: |
dist/bundle.zip
- uses: ncipollo/release-action@v1
with:
artifacts: "dist/bundle.zip"
allowUpdates: true
# Protects us from inadvertently releasing a non pre-release version
updateOnlyUnreleased: true
generateReleaseNotes: true
name: Nightly beta
prerelease: true
replacesArtifacts: true
tag: beta
body: |
The nightly release of the beta plugin.