Skip to content
FlightStack Docs
Sign in Start free

Create Env File Job | FlightStack

Generates an .env file (or any KEY=VALUE-style file) from FlightStack variables and secrets. Useful for packages like flutter_dotenv that expect a literal file on disk.

Step ref: flightstack/create-env-file@1.0.0.

OptionDescriptionDefault
PathPath to write to (relative to the repo root).env
VariablesNames of FlightStack variables / secrets to includerequired
Formatdotenv (KEY=value), properties (KEY=value), xml, jsondotenv
Include scopeWhich scopes to draw from: repo, pipeline, group, orgall
CommentOptional header comment prepended to the file# Generated by FlightStack

Values are resolved in standard scope order — see variables → scope resolution.

Secrets (variables with isSecret: true) are decrypted on the agent and written into the file with the same permissions as the build workspace (mode 0600).

The file is never persisted to artifact storage and is shredded when the job ends.

steps:
- name: env
uses: flightstack/create-env-file@1.0.0
inputs:
path: .env
variables:
- API_BASE_URL
- SENTRY_DSN
- GOOGLE_MAPS_KEY
format: dotenv
- name: build
uses: flightstack/build-android@1.0.0

This writes:

# Generated by FlightStack
API_BASE_URL=https://api.example.com
SENTRY_DSN=https://abc123@sentry.io/1
GOOGLE_MAPS_KEY=AIza...

…then the Build Android step picks it up via flutter_dotenv or similar.