Skip to content

Nightly beta release #542

Nightly beta release

Nightly beta release #542

Workflow file for this run

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/create-envfile@v2.0
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.