feat: export env vars from mise.toml (#241)

Solve https://github.com/jdx/mise-action/issues/36

BREAKING CHANGE: we're defaulting this behavior to `true`

---------

Co-authored-by: jdx <216188+jdx@users.noreply.github.com>
This commit is contained in:
Mael 2025-08-18 18:33:13 +02:00 committed by GitHub
parent e7e48454f4
commit f0b1d70eae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 22 additions and 2 deletions

View file

@ -35,6 +35,11 @@ async function run(): Promise<void> {
}
}
await miseLs()
const loadEnv = core.getBooleanInput('env')
if (loadEnv) {
const output = await exec.getExecOutput('mise', ['env', '--dotenv'])
fs.appendFileSync(process.env.GITHUB_ENV!, output.stdout)
}
} catch (err) {
if (err instanceof Error) core.setFailed(err.message)
else throw err