Commit graph

91 commits

Author SHA1 Message Date
mise-en-dev
be3be2260b
chore: release v3.4.0 (#291)
---
## [3.4.0](https://github.com/jdx/mise-action/compare/v3.3.1..v3.4.0) -
2025-10-31

### 🚀 Features

- use autofix.ci to auto-update dist/ on all PRs by
[@jdx](https://github.com/jdx) in
[16e9fd5](16e9fd5251)
- use autofix.ci to auto-update dist/ on all PRs (#308) by
[@jdx](https://github.com/jdx) in
[#308](https://github.com/jdx/mise-action/pull/308)

### 🐛 Bug Fixes

- add missing `await` to `core.group` calls (#305) by
[@smorimoto](https://github.com/smorimoto) in
[#305](https://github.com/jdx/mise-action/pull/305)
- auto-update dist folder in Renovate PRs via GitHub Actions (#306) by
[@jdx](https://github.com/jdx) in
[#306](https://github.com/jdx/mise-action/pull/306)
- configure Renovate to ignore github-actions[bot] commits by
[@jdx](https://github.com/jdx) in
[993e7d0](993e7d0bb6)
- run auto-update-dist workflow on all PRs by
[@jdx](https://github.com/jdx) in
[6d0fd75](6d0fd75ed5)

### 📚 Documentation

- update to v3 in README (#290) by [@pdecat](https://github.com/pdecat)
in [#290](https://github.com/jdx/mise-action/pull/290)

### ⚙️ Miscellaneous Tasks

- upgrade all workflows to Node 24 by [@jdx](https://github.com/jdx) in
[c7b5f37](c7b5f37cad)
- remove unused workflow by [@jdx](https://github.com/jdx) in
[aecb23d](aecb23d92f)

### New Contributors

* @smorimoto made their first contribution in
[#305](https://github.com/jdx/mise-action/pull/305)
* @pdecat made their first contribution in
[#290](https://github.com/jdx/mise-action/pull/290)

<!-- generated by git-cliff -->

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-31 10:43:55 -05:00
jdx
aecb23d92f
chore: remove unused workflow 2025-10-31 10:00:58 -05:00
renovate[bot]
e82281ebcf
chore(deps): lock file maintenance (#301)
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on monday" in timezone
America/Chicago, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/jdx/mise-action).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTYuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE1OS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-31 14:58:08 +00:00
Sora Morimoto
3a0b1ebdc6
fix: add missing await to core.group calls (#305) 2025-10-31 08:34:27 -05:00
Gregor Zeitlinger
254003e261
fix: trim "v" prefix on update (#287)
Fixes https://github.com/jdx/mise-action/issues/285
2025-10-06 06:17:50 -05:00
jdx
5795893ace
chore: updated deps 2025-10-03 11:52:16 +00:00
Sébastien Maintrot
77a964b3e4
feat: use self-update to modify version if mise is already installed (#277)
Hello 👋 

1st of all thanks for your work on mise, it's really a game changer 😁 

## Why
This PR tries to address the issue #165 (mise-action cannot upgrade
mise)

## What
I've decided to use `mise self-update` if mise is already installed to
switch to the desired version
Let me know if this is an OK fix for you

## Tests
To test this feature, I've run the action on my repo and screenshot the
newly created output

<img width="591" height="538" alt="Screenshot 2025-10-01 at 22 14 46"
src="https://github.com/user-attachments/assets/9a10a33a-d86f-410b-8bdc-71b07b3036f6"
/>

The sha of the commit was suposed to match the sha of the screenshot,
but I've fixup and rebase the PR
Happy to do a new one if you want live proof

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> When mise is already installed, compare the requested `version` input
to the installed version and run `self-update` to align if they differ.
> 
> - **Action Logic (`src/index.ts`)**:
>   - **Existing Installation Handling**:
> - Read `version` input; fetch installed version via `mise version
--json`.
> - If versions differ, execute `mise self-update <version> -y`;
otherwise log that mise is already installed.
>   - Download path and SHA256 verification remain unchanged.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
941208cb9b7a6e796cdc7e96a8dcf6560d4d207c. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-03 11:43:01 +00:00
Risu
2f998c07b7
fix(cache): replace , in MISE_ENV with - (#278)
Fixes https://github.com/jdx/mise-action/issues/276

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Replaces commas in MISE_ENV with hyphens when constructing the cache
key to ensure stable/valid keys.
> 
> - **Cache Key Generation**:
> - In `src/index.ts`, normalizes `MISE_ENV` via `replace(/,/g, '-')`
and uses it as `mise_env` when building the cache key template.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
899df938a6. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-01 19:16:12 -05:00
jdx
5e785b73cb
fix: redact secret values from env (#252) 2025-08-22 09:38:59 -05:00
Pedro Piñera Buendía
0f242c8c39
feat: add environment variable support to cache key templates (#250)
I added support for customizing the key, but forgot the most important
piece that we need, being able to reference an environment variable
value. Our CI runner provider is now exposing an environment variable
that indicates if the OS configuration changes, and we plan to use that
one to invalidate the cache, otherwise we get errors because the cached
dependencies are linking against an invalid / non-existent `glibc`
version.

> [!IMPORTANT]
> I wrote the code with `claude code` and reviewed it afterwards

## Summary (Claude-generated)
- Add support for `{{env.VAR_NAME}}` syntax in cache key templates to
allow reading environment variable values
- Enables more flexible cache key customization based on CI/CD
environment variables like branch names, deployment environments, or
custom build identifiers
- Maintains backward compatibility with existing cache key templates

## Examples
```yaml
# Include branch name from environment
cache_key: 'mise-{{env.GITHUB_REF_NAME}}-{{platform}}-{{file_hash}}'

# Use custom deployment environment
cache_key: 'mise-{{env.DEPLOY_ENV}}-{{platform}}-{{file_hash}}'

# Conditional logic with environment variables
cache_key: '{{default}}{{#if env.CUSTOM_SUFFIX}}-{{env.CUSTOM_SUFFIX}}{{/if}}'
```

## Changes
- Modified `processCacheKeyTemplate()` in `src/index.ts` to include
`process.env` in template data
- Updated `action.yml` documentation to include the new
`{{env.VAR_NAME}}` syntax
- All existing functionality remains unchanged

## Test plan
- [x] Build and package successfully with `npm run all`
- [x] Linting and formatting pass
- [ ] Manual testing with environment variables in cache key templates
- [ ] Verify backward compatibility with existing cache key
configurations
2025-08-22 05:04:00 -05:00
Pedro Piñera Buendía
d53c31b046
feat: add configurable cache key with template variable support (#246)
I closed [this PR](https://github.com/jdx/mise-action/pull/235) by
mistake so I'm reopening it.
2025-08-19 10:59:36 -05:00
jdx
1dfcbbcb60
chore: updated deps (#244) 2025-08-18 16:54:15 +00:00
Mael
f0b1d70eae
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>
2025-08-18 16:33:13 +00:00
jdx
adbb7adcf1
feat: allow fetching binary from mise.jdx.dev (#227)
THANKS CLOUDFLARE FOR PROJECT ALEXANDRIA
2025-07-24 06:09:13 +00:00
Andrew Driggs
b64166e6f5
Fix flag passed to mise reshim (#208)
* Fix flag passed to `mise reshim`

* chore: update dist after build
2025-07-15 17:30:41 -07:00
jdx
af4b5b2b4b
chore: updated deps (#219) 2025-07-12 06:23:29 -05:00
Gregor Zeitlinger
ca07392817
support checksum (#218)
* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum

* support checksum
2025-07-12 06:17:19 -05:00
jdx
233d283dd6
Revert "add all MISE_ env vars to cache key (#197)"
This reverts commit a5b33d7b88.
2025-06-25 11:54:34 -05:00
jdx
7e5e321e56
chore: updated deps 2025-06-25 07:22:29 -05:00
Mate Molnar
d24e3836a6
feat: pass github token for mise calls (#205) 2025-06-25 07:20:55 -05:00
jdx
ec352a8916
chore: node-24 2025-06-17 12:12:32 -05:00
Gregor Zeitlinger
a5b33d7b88
add all MISE_ env vars to cache key (#197)
Co-authored-by: jdx <216188+jdx@users.noreply.github.com>
2025-06-17 17:12:06 +00:00
Andrew Driggs
883a83c54f
Add reshim flag to reshim after setup (#202) 2025-06-17 02:03:19 -05:00
jdx
13abe502c3
2.2.3 2025-05-26 19:13:20 -05:00
Prashant V
367a97c7a9
Add MISE_ENV to cache key if set (#196)
Fixes #169
2025-05-26 19:13:00 -05:00
jdx
69bf3f1a1f
chore: updated deps 2025-05-12 07:16:35 -05:00
Victor LEFEBVRE
923c9f44ed
Fix alpine container installation (#189)
* Change test tool for future alpine CI testing

* replace node with jq as it doesnt require any build on alpine

* Fix alpine musl container install

* add tests around mise install in alpine container

* add support for musl os
Fixes: https://github.com/jdx/mise-action/issues/186

* alpine needs bash to run test.sh script

* remove unneeded logs

* Update test.yml

* Update test.yml
2025-05-12 07:15:17 -05:00
jdx
4a07a7ced0
fix: show message when saving cache 2025-04-22 22:54:30 -05:00
jdx
81d53cf968
fix: save cache when build fails
Fixes #99
2025-04-22 22:41:39 -05:00
jdx
ff329b72ac
chore: updated deps 2025-04-22 22:25:08 -05:00
Ville Skyttä
5e190f2e46
feat: run mise ls (#163) 2025-01-05 18:43:06 +00:00
jdx
b82835fe1f
fix: use tar.gz if zstd is not available (#159)
Fixes #155
2024-12-30 16:44:25 +00:00
jdx
2408f570e1
chore: use github releases (#154) 2024-12-23 13:59:01 -06:00
jdx
370e73c4f0
feat: fetch tarball with zst compression (#153) 2024-12-23 19:31:53 +00:00
jdx
3601336acb
chore: updated deps 2024-12-13 06:03:07 -06:00
jdx
52c535ffc8
chore: updated deps 2024-11-27 18:10:51 -06:00
jdx
793f8df484
chore: added pre-commit task 2024-11-18 13:24:06 -06:00
Risu
2d33c855a3
fix: fix cache_save option (#144) 2024-11-18 13:20:21 -06:00
Frederik Boster
7b77be967a
fix: use correct glob format for cache key file hash (#139) 2024-11-06 14:43:47 +00:00
jdx
239a5da37c
chore: update deps 2024-11-04 10:28:30 -06:00
jdx
57eda1a45f
fix: use lockfile for cache key 2024-11-04 10:26:21 -06:00
Maximilian Remming
fb230aa558
fix: overwrite MISE_LOG_LEVEL when in debug mode (#138)
As the log_level parameter defaults to info the MISE_LOG_LEVEL
environment variable needs to be overriden or otherwise it is not set.
This also means that mise-action will always run with debug logging when
it is ran with debugging enabled, no matter what log level the user has
set.
2024-10-29 07:08:34 -05:00
Jeff Dickey
86b003e69f
chore: fetch mise compressed 2024-10-27 20:20:20 -05:00
Jeff Dickey
c20c9ebb8b
chore: fetch mise compressed 2024-10-27 20:18:38 -05:00
Risu
f2a7466821
fix: add install_args hash to cache key (#136)
* fix: add install_args hash to cache key

* fix: sort tools before hashing
2024-10-26 06:25:44 -05:00
Maximilian Remming
cc7f0e6690
feat: use debug logging when in debug mode (#128) (#129)
* feat: use debug logging when in debug mode (#128)

* chore: remove unnecessary getExperimental function

* chore: fix setupMise typing

As `core.getInput` returns always a string, the type of `version` in
`setupMise` should be just a `string`. When the string is empty it means
to use the latest version. This could be made cleaner but this is how it
works.

* feat: only set MISE_LOG_LEVEL when required

Previously MISE_LOG_LEVEL was always set, even when log_level parameter
wasn't configured. This changes that behaviour so that the environment
variable is only set when log_level is set by the user and that the
MISE_LOG_LEVEL is set to debug only for this action when in debug mode.

---------

Co-authored-by: Jeff Dickey <216188+jdx@users.noreply.github.com>
2024-10-25 16:48:49 +00:00
jdx
477762426f
fix: cache_save boolean bug (#135)
Fixes #130
2024-10-25 14:03:09 +00:00
jdx
1b7ab9b9c1
fix: cache mise bin (#134)
Fixes #133
2024-10-24 01:27:00 +00:00
jdx
5d3e058edf
feat: support windows (#122) 2024-09-25 21:27:52 +00:00
renovate[bot]
bd6a003a27
chore(deps): lock file maintenance (#102)
* chore(deps): lock file maintenance

* rebuild

* rebuild

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jeff Dickey <216188+jdx@users.noreply.github.com>
2024-07-29 18:40:29 +00:00