mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-14 13:50:33 +00:00
Compare commits
60 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0eaf7aa03 | ||
|
|
46bb674500 | ||
|
|
ff58e14023 | ||
|
|
3b3c8bb538 | ||
|
|
8d3b0ba20a | ||
|
|
590bfd78fa | ||
|
|
c0cbd12180 | ||
|
|
34cccd8792 | ||
|
|
396ce9daa2 | ||
|
|
8720daa86c | ||
|
|
c6a35e2d7d | ||
|
|
b9e293457e | ||
|
|
9839807d80 | ||
|
|
1a7cfe9372 | ||
|
|
b287efda3d | ||
|
|
ac8a6414ec | ||
|
|
0a780158e1 | ||
|
|
3cd8ad48b8 | ||
|
|
1c5f70fd40 | ||
|
|
5ad13376e3 | ||
|
|
6fa7302151 | ||
|
|
db69447ab3 | ||
|
|
89d8187abc | ||
|
|
4513fc1bd4 | ||
|
|
2f9976bb5b | ||
|
|
4d6abcf45f | ||
|
|
f1b645161c | ||
|
|
d6e9fb75ae | ||
|
|
a407fefef5 | ||
|
|
3b61f05fac | ||
|
|
6ffba57a54 | ||
|
|
2a3eb97a03 | ||
|
|
a25e4af358 | ||
|
|
8b65f8f4d4 | ||
|
|
0b79532206 | ||
|
|
5dd08e1290 | ||
|
|
ac93c8a0e0 | ||
|
|
970e54e062 | ||
|
|
41a529d4f6 | ||
|
|
f2530f6d59 | ||
|
|
05f8e725d3 | ||
|
|
1c992c2b17 | ||
|
|
d93325ba61 | ||
|
|
641a2bcbed | ||
|
|
ae16675061 | ||
|
|
b106a2f3b6 | ||
|
|
0b4dcb0c10 | ||
|
|
1648a7812b | ||
|
|
e2d499cca6 | ||
|
|
0cc0f19036 | ||
|
|
89c67a39ab | ||
|
|
0409dde834 | ||
|
|
abadabdb1f | ||
|
|
c5b2043e51 | ||
|
|
71c0f0ac17 | ||
|
|
c1ecc8f748 | ||
|
|
1cbe8c560f | ||
|
|
35ed1d362d | ||
|
|
02bfe7363e | ||
|
|
9a9bfbd065 |
31 changed files with 86867 additions and 119156 deletions
33
.github/workflows/autofix.yml
vendored
33
.github/workflows/autofix.yml
vendored
|
|
@ -1,33 +0,0 @@
|
||||||
name: autofix.ci
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
autofix:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout PR branch
|
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
|
|
||||||
with:
|
|
||||||
node-version: '24'
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Build and package
|
|
||||||
run: npm run all
|
|
||||||
|
|
||||||
- name: autofix.ci
|
|
||||||
uses: autofix-ci/action@7a166d7532b277f34e16238930461bf77f9d7ed8 # v1
|
|
||||||
14
.github/workflows/check-dist.yml
vendored
14
.github/workflows/check-dist.yml
vendored
|
|
@ -32,20 +32,18 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
id: checkout
|
id: checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
|
|
||||||
with:
|
with:
|
||||||
node-version: 24
|
persist-credentials: false
|
||||||
cache: npm
|
|
||||||
|
- uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
id: install
|
id: install
|
||||||
run: npm ci
|
run: aube ci
|
||||||
|
|
||||||
- name: Build dist/ Directory
|
- name: Build dist/ Directory
|
||||||
id: build
|
id: build
|
||||||
run: npm run bundle
|
run: aubr bundle
|
||||||
|
|
||||||
- name: Compare Expected and Actual Directories
|
- name: Compare Expected and Actual Directories
|
||||||
id: diff
|
id: diff
|
||||||
|
|
@ -58,7 +56,7 @@ jobs:
|
||||||
|
|
||||||
# If index.js was different than expected, upload the expected version as
|
# If index.js was different than expected, upload the expected version as
|
||||||
# a workflow artifact.
|
# a workflow artifact.
|
||||||
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
||||||
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
|
|
|
||||||
32
.github/workflows/ci.yml
vendored
32
.github/workflows/ci.yml
vendored
|
|
@ -7,6 +7,9 @@ on:
|
||||||
- main
|
- main
|
||||||
- 'releases/*'
|
- 'releases/*'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref_name }}
|
group: ${{ github.workflow }}-${{ github.ref_name }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
@ -20,25 +23,30 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
id: checkout
|
id: checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
id: setup-node
|
|
||||||
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
|
|
||||||
with:
|
with:
|
||||||
node-version: 24
|
persist-credentials: false
|
||||||
cache: npm
|
|
||||||
|
# `mise.toml` pins both Node and aube; mise-action installs
|
||||||
|
# whatever's listed there. Reads `package-lock.json`
|
||||||
|
# directly — no separate `aube-lock.yaml` to maintain.
|
||||||
|
# `.npmrc` pins `node-linker=hoisted` so the layout is
|
||||||
|
# npm-flat (rollup's `--configPlugin` resolution
|
||||||
|
# requires this).
|
||||||
|
- uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4
|
||||||
|
with:
|
||||||
|
cache: false
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
id: npm-ci
|
id: aube-ci
|
||||||
run: npm ci
|
run: aube ci
|
||||||
|
|
||||||
- name: Check Format
|
- name: Check Format
|
||||||
id: npm-format-check
|
id: aube-format-check
|
||||||
run: npm run format:check
|
run: aubr format:check
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
id: npm-lint
|
id: aube-lint
|
||||||
run: npm run lint
|
run: aubr lint
|
||||||
|
|
||||||
# - name: Test
|
# - name: Test
|
||||||
# id: npm-ci-test
|
# id: npm-ci-test
|
||||||
|
|
|
||||||
8
.github/workflows/codeql-analysis.yml
vendored
8
.github/workflows/codeql-analysis.yml
vendored
|
|
@ -35,18 +35,20 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
id: checkout
|
id: checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
id: initialize
|
id: initialize
|
||||||
uses: github/codeql-action/init@45580472a5bb82c4681c4ac726cfdb60060c2ee1 # v3
|
uses: github/codeql-action/init@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
source-root: src
|
source-root: src
|
||||||
|
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
id: autobuild
|
id: autobuild
|
||||||
uses: github/codeql-action/autobuild@45580472a5bb82c4681c4ac726cfdb60060c2ee1 # v3
|
uses: github/codeql-action/autobuild@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
id: analyze
|
id: analyze
|
||||||
uses: github/codeql-action/analyze@45580472a5bb82c4681c4ac726cfdb60060c2ee1 # v3
|
uses: github/codeql-action/analyze@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4
|
||||||
|
|
|
||||||
31
.github/workflows/pr-closer.yml
vendored
Normal file
31
.github/workflows/pr-closer.yml
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
name: pr-closer
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *" # daily at midnight
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
close-stale-prs:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
steps:
|
||||||
|
- name: Close stale PRs
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
gh pr list -R "${{ github.repository }}" --state open --json number,author,labels,updatedAt,statusCheckRollup --limit 100 | \
|
||||||
|
jq -r '.[] | select(
|
||||||
|
(.updatedAt | fromdateiso8601) < (now - 30*24*60*60) and
|
||||||
|
.author.login != "jdx" and
|
||||||
|
([.labels[].name] | index("keep-open") | not)
|
||||||
|
) | [.number, (if (.statusCheckRollup | length > 0) and (.statusCheckRollup | any(.conclusion == "FAILURE" or .conclusion == "failure")) then "failing" else "passing" end)] | @tsv' | \
|
||||||
|
while read -r pr status; do
|
||||||
|
echo "Closing PR #$pr (checks: $status)"
|
||||||
|
if [ "$status" = "failing" ]; then
|
||||||
|
gh pr close "$pr" -R "${{ github.repository }}" -c "This PR has been open for more than 30 days without activity. Note: CI checks were failing, which may be why it wasn't reviewed. Feel free to reopen or create a new PR if you'd like to continue working on this."
|
||||||
|
else
|
||||||
|
gh pr close "$pr" -R "${{ github.repository }}" -c "This PR has been open for more than 30 days without activity. Feel free to reopen or create a new PR if you'd like to continue working on this."
|
||||||
|
fi
|
||||||
|
done
|
||||||
3
.github/workflows/release-plz.yml
vendored
3
.github/workflows/release-plz.yml
vendored
|
|
@ -26,7 +26,8 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
token: ${{ secrets.RELEASE_PLZ_GITHUB_TOKEN }}
|
token: ${{ secrets.RELEASE_PLZ_GITHUB_TOKEN }}
|
||||||
- uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2
|
persist-credentials: false
|
||||||
|
- uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4
|
||||||
- run: mise run release-plz
|
- run: mise run release-plz
|
||||||
env:
|
env:
|
||||||
DRY_RUN: 0
|
DRY_RUN: 0
|
||||||
|
|
|
||||||
29
.github/workflows/release.yml
vendored
29
.github/workflows/release.yml
vendored
|
|
@ -5,24 +5,45 @@ on:
|
||||||
types: [closed]
|
types: [closed]
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
permissions:
|
permissions: {}
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
|
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Setup mise
|
- name: Setup mise
|
||||||
uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2
|
uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
run: ./scripts/postversion.sh
|
run: ./scripts/postversion.sh
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
enhance-release:
|
||||||
|
needs: [release]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
persist-credentials: false
|
||||||
|
- uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4
|
||||||
|
- name: Enhance release notes with communique
|
||||||
|
run: |
|
||||||
|
TAG_NAME="v$(jq -r .version package.json)"
|
||||||
|
communique generate "$TAG_NAME" --github-release
|
||||||
|
env:
|
||||||
|
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
19
.github/workflows/semantic-pr-lint.yml
vendored
19
.github/workflows/semantic-pr-lint.yml
vendored
|
|
@ -1,19 +0,0 @@
|
||||||
name: semantic-pr-lint
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- edited
|
|
||||||
- reopened
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
main:
|
|
||||||
name: Validate PR title
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
pull-requests: read
|
|
||||||
steps:
|
|
||||||
- uses: amannn/action-semantic-pull-request@e32d7e603df1aa1ba07e981f2a23455dee596825 # v5
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
5
.github/workflows/test-redacted-env.yml
vendored
5
.github/workflows/test-redacted-env.yml
vendored
|
|
@ -7,12 +7,17 @@ on:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-redacted-env:
|
test-redacted-env:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Create test mise config with sensitive values
|
- name: Create test mise config with sensitive values
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
44
.github/workflows/test.yml
vendored
44
.github/workflows/test.yml
vendored
|
|
@ -8,6 +8,9 @@ on: # rebuild any PRs and main branch changes
|
||||||
- main
|
- main
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref_name }}
|
group: ${{ github.workflow }}-${{ github.ref_name }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
@ -17,10 +20,11 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
- run: |
|
with:
|
||||||
npm install
|
persist-credentials: false
|
||||||
- run: |
|
- uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4
|
||||||
npm run all
|
- run: aube install
|
||||||
|
- run: aubr all
|
||||||
test: # make sure the action works on a clean machine without building
|
test: # make sure the action works on a clean machine without building
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
@ -44,6 +48,8 @@ jobs:
|
||||||
if: ${{ matrix.requirements }}
|
if: ${{ matrix.requirements }}
|
||||||
run: ${{ matrix.requirements }}
|
run: ${{ matrix.requirements }}
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Setup mise
|
- name: Setup mise
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
@ -66,6 +72,8 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Setup mise
|
- name: Setup mise
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
@ -91,6 +99,8 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Setup mise
|
- name: Setup mise
|
||||||
id: bad
|
id: bad
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
@ -108,14 +118,18 @@ jobs:
|
||||||
if: ${{ steps.bad.outcome == 'failure' }}
|
if: ${{ steps.bad.outcome == 'failure' }}
|
||||||
- name: not failed as expected
|
- name: not failed as expected
|
||||||
run: |
|
run: |
|
||||||
echo "Expected failure but the job was ${{ steps.bad.outcome }}"
|
echo "Expected failure but the job was ${STEPS_BAD_OUTCOME}"
|
||||||
exit 1
|
exit 1
|
||||||
if: ${{ steps.bad.outcome != 'failure' }}
|
if: ${{ steps.bad.outcome != 'failure' }}
|
||||||
|
env:
|
||||||
|
STEPS_BAD_OUTCOME: ${{ steps.bad.outcome }}
|
||||||
|
|
||||||
custom_cache_key:
|
custom_cache_key:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Setup mise with custom cache key
|
- name: Setup mise with custom cache key
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
@ -133,6 +147,8 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Setup mise from mise.jdx.dev
|
- name: Setup mise from mise.jdx.dev
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
@ -146,3 +162,21 @@ jobs:
|
||||||
- run: mise x jq -- jq --version
|
- run: mise x jq -- jq --version
|
||||||
- run: which jq
|
- run: which jq
|
||||||
- run: jq --version
|
- run: jq --version
|
||||||
|
|
||||||
|
final:
|
||||||
|
needs:
|
||||||
|
- build
|
||||||
|
- test
|
||||||
|
- specific_version
|
||||||
|
- checksum_failure
|
||||||
|
- custom_cache_key
|
||||||
|
- fetch_from_github
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 1
|
||||||
|
# Run on success or upstream failure but skip when the workflow is cancelled
|
||||||
|
# — `always()` would override `cancel-in-progress` and waste a runner.
|
||||||
|
if: ${{ !cancelled() }}
|
||||||
|
steps:
|
||||||
|
- name: Check CI job results
|
||||||
|
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')
|
||||||
|
run: exit 1
|
||||||
|
|
|
||||||
22
.github/workflows/zizmor.yml
vendored
Normal file
22
.github/workflows/zizmor.yml
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
name: zizmor
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
paths: ['.github/workflows/**']
|
||||||
|
pull_request:
|
||||||
|
paths: ['.github/workflows/**']
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
zizmor:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3
|
||||||
|
with:
|
||||||
|
advanced-security: false
|
||||||
7
.gitignore
vendored
7
.gitignore
vendored
|
|
@ -101,3 +101,10 @@ __tests__/runner/*
|
||||||
.idea
|
.idea
|
||||||
.vscode
|
.vscode
|
||||||
*.code-workspace
|
*.code-workspace
|
||||||
|
|
||||||
|
# Generated by `aube install` to record build-script approvals.
|
||||||
|
# We've chosen not to commit our approval state — the build doesn't
|
||||||
|
# need any package's install scripts to run, and the file gets
|
||||||
|
# regenerated each install anyway. The harmless "ignored build
|
||||||
|
# scripts" warning in `aube install` output is the cost.
|
||||||
|
pnpm-workspace.yaml
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
|
|
||||||
|
npm ci
|
||||||
npm run all
|
npm run all
|
||||||
git add dist
|
git add dist
|
||||||
|
|
|
||||||
11
.npmrc
Normal file
11
.npmrc
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# Forces a flat npm-style `node_modules/` layout instead of
|
||||||
|
# aube's default symlink/virtual-store. Required for
|
||||||
|
# deterministic `dist/index.js.map` source-map paths in CI:
|
||||||
|
# without flat layout, rollup embeds absolute paths into
|
||||||
|
# aube's per-user cache dir (`/home/runner/.cache/aube/...`),
|
||||||
|
# which differ across machines and break the `check-dist`
|
||||||
|
# workflow's byte-equality check.
|
||||||
|
#
|
||||||
|
# npm reads `.npmrc` too but ignores `node-linker` (npm
|
||||||
|
# always installs flat), so the file is safe for both PMs.
|
||||||
|
node-linker=hoisted
|
||||||
35
CHANGELOG.md
35
CHANGELOG.md
|
|
@ -1,5 +1,40 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
---
|
||||||
|
## [4.0.1](https://github.com/jdx/mise-action/compare/v4.0.0..v4.0.1) - 2026-03-22
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
- run npm install in pre-commit hook before build (#410) by [@jdx](https://github.com/jdx) in [#410](https://github.com/jdx/mise-action/pull/410)
|
||||||
|
|
||||||
|
### 🚜 Refactor
|
||||||
|
|
||||||
|
- extract getCwd() helper to deduplicate working directory resolution (#403) by [@altendky](https://github.com/altendky) in [#403](https://github.com/jdx/mise-action/pull/403)
|
||||||
|
|
||||||
|
### 📚 Documentation
|
||||||
|
|
||||||
|
- bump versions listed im README.md (#407) by [@deining](https://github.com/deining) in [#407](https://github.com/jdx/mise-action/pull/407)
|
||||||
|
- bump more versions listed in README.md (#408) by [@deining](https://github.com/deining) in [#408](https://github.com/jdx/mise-action/pull/408)
|
||||||
|
|
||||||
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- add workflow to auto-close stale PRs (#409) by [@jdx](https://github.com/jdx) in [#409](https://github.com/jdx/mise-action/pull/409)
|
||||||
|
|
||||||
|
### New Contributors
|
||||||
|
|
||||||
|
* @deining made their first contribution in [#408](https://github.com/jdx/mise-action/pull/408)
|
||||||
|
|
||||||
|
---
|
||||||
|
## [4.0.0](https://github.com/jdx/mise-action/compare/v3.6.3..v4.0.0) - 2026-03-13
|
||||||
|
|
||||||
|
### 🚀 Features
|
||||||
|
|
||||||
|
- **breaking** Update Node.js version from 20 to 24 (#395) by [@tumerorkun](https://github.com/tumerorkun) in [#395](https://github.com/jdx/mise-action/pull/395)
|
||||||
|
|
||||||
|
### New Contributors
|
||||||
|
|
||||||
|
* @tumerorkun made their first contribution in [#395](https://github.com/jdx/mise-action/pull/395)
|
||||||
|
|
||||||
---
|
---
|
||||||
## [3.6.3](https://github.com/jdx/mise-action/compare/v3.6.2..v3.6.3) - 2026-03-06
|
## [3.6.3](https://github.com/jdx/mise-action/compare/v3.6.2..v3.6.3) - 2026-03-06
|
||||||
|
|
||||||
|
|
|
||||||
24
CLAUDE.md
24
CLAUDE.md
|
|
@ -8,21 +8,29 @@ This is a GitHub Action that installs and configures mise, a polyglot runtime ma
|
||||||
|
|
||||||
## Development Commands
|
## Development Commands
|
||||||
|
|
||||||
|
This project uses [aube](https://aube.en.dev) as its package
|
||||||
|
manager (en.dev's pnpm-compat PM, native Rust). It reads
|
||||||
|
`package-lock.json` directly — no separate `aube-lock.yaml`.
|
||||||
|
`mise install` will install the pinned aube version
|
||||||
|
automatically; you can also use `npm` if you prefer (the
|
||||||
|
`.npmrc`'s `node-linker=hoisted` pin is aube-specific and
|
||||||
|
ignored by npm).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
npm install
|
aube install
|
||||||
|
|
||||||
# Build, format, lint, and package
|
# Build, format, lint, and package
|
||||||
npm run all
|
aubr all
|
||||||
|
|
||||||
# Individual commands
|
# Individual commands
|
||||||
npm run format:write # Format code with Prettier
|
aubr format:write # Format code with Prettier
|
||||||
npm run lint # Run ESLint and format check
|
aubr lint # Run ESLint and format check
|
||||||
npm run package # Bundle with ncc for distribution
|
aubr package # Bundle with rollup for distribution
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
npm run all # Run full build pipeline
|
aubr all # Run full build pipeline
|
||||||
./scripts/test.sh # Integration test script
|
./scripts/test.sh # Integration test script
|
||||||
```
|
```
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
@ -50,6 +58,6 @@ The action follows GitHub's standard TypeScript action structure:
|
||||||
|
|
||||||
## Important Notes
|
## Important Notes
|
||||||
|
|
||||||
- Always run `npm run all` before committing to ensure dist/ is updated
|
- Always run `aubr all` before committing to ensure dist/ is updated
|
||||||
- The dist/ folder must be committed as GitHub Actions runs the compiled code
|
- The dist/ folder must be committed as GitHub Actions runs the compiled code
|
||||||
- Test changes using the action itself (uses: ./) in test workflows
|
- Test changes using the action itself (uses: ./) in test workflows
|
||||||
|
|
|
||||||
32
README.md
32
README.md
|
|
@ -13,10 +13,10 @@ jobs:
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- uses: jdx/mise-action@v3
|
- uses: jdx/mise-action@v4
|
||||||
with:
|
with:
|
||||||
version: 2024.10.0 # [default: latest] mise version to install
|
version: 2026.3.10 # [default: latest] mise version to install
|
||||||
install: true # [default: true] run `mise install`
|
install: true # [default: true] run `mise install`
|
||||||
install_args: "bun" # [default: ""] additional arguments to `mise install`
|
install_args: "bun" # [default: ""] additional arguments to `mise install`
|
||||||
cache: true # [default: true] cache mise using GitHub's cache
|
cache: true # [default: true] cache mise using GitHub's cache
|
||||||
|
|
@ -24,11 +24,11 @@ jobs:
|
||||||
log_level: debug # [default: info] log level
|
log_level: debug # [default: info] log level
|
||||||
# automatically write this .tool-versions file
|
# automatically write this .tool-versions file
|
||||||
tool_versions: |
|
tool_versions: |
|
||||||
shellcheck 0.9.0
|
shellcheck 0.11.0
|
||||||
# or, if you prefer .mise.toml format:
|
# or, if you prefer .mise.toml format:
|
||||||
mise_toml: |
|
mise_toml: |
|
||||||
[tools]
|
[tools]
|
||||||
shellcheck = "0.9.0"
|
shellcheck = "0.11.0"
|
||||||
working_directory: app # [default: .] directory to run mise in
|
working_directory: app # [default: .] directory to run mise in
|
||||||
reshim: false # [default: false] run `mise reshim -f`
|
reshim: false # [default: false] run `mise reshim -f`
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }} # [default: ${{ github.token }}] GitHub token for API authentication
|
github_token: ${{ secrets.GITHUB_TOKEN }} # [default: ${{ github.token }}] GitHub token for API authentication
|
||||||
|
|
@ -36,8 +36,8 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- uses: jdx/mise-action@v3
|
- uses: jdx/mise-action@v4
|
||||||
# .tool-versions will be read from repo root
|
# .tool-versions will be read from repo root
|
||||||
- run: node ./my_app.js
|
- run: node ./my_app.js
|
||||||
```
|
```
|
||||||
|
|
@ -47,7 +47,7 @@ jobs:
|
||||||
You can customize the cache key used by the action:
|
You can customize the cache key used by the action:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: jdx/mise-action@v3
|
- uses: jdx/mise-action@v4
|
||||||
with:
|
with:
|
||||||
cache_key: "my-custom-cache-key" # Override the entire cache key
|
cache_key: "my-custom-cache-key" # Override the entire cache key
|
||||||
cache_key_prefix: "mise-v1" # Or just change the prefix (default: "mise-v0")
|
cache_key_prefix: "mise-v1" # Or just change the prefix (default: "mise-v0")
|
||||||
|
|
@ -58,17 +58,17 @@ You can customize the cache key used by the action:
|
||||||
When using `cache_key`, you can use template variables to reference internal values:
|
When using `cache_key`, you can use template variables to reference internal values:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: jdx/mise-action@v3
|
- uses: jdx/mise-action@v4
|
||||||
with:
|
with:
|
||||||
cache_key: "mise-{{platform}}-{{version}}-{{file_hash}}"
|
cache_key: "mise-{{platform}}-{{version}}-{{file_hash}}"
|
||||||
version: "2024.10.0"
|
version: "2026.3.10"
|
||||||
install_args: "node python"
|
install_args: "node python"
|
||||||
```
|
```
|
||||||
|
|
||||||
Available template variables:
|
Available template variables:
|
||||||
- `{{version}}` - The mise version (from the `version` input)
|
- `{{version}}` - The mise version (from the `version` input)
|
||||||
- `{{cache_key_prefix}}` - The cache key prefix (from `cache_key_prefix` input or default)
|
- `{{cache_key_prefix}}` - The cache key prefix (from `cache_key_prefix` input or default)
|
||||||
- `{{platform}}` - The target platform (e.g., "linux-x64", "macos-arm64")
|
- `{{platform}}` - The target platform, including the runner image (e.g., "linux-x64-ubuntu24", "macos-arm64-macos15", "linux-x64-self-hosted"). The trailing segment is `process.env.ImageOS` on github-hosted runners and falls back to `"self-hosted"` elsewhere — preventing cache collisions when the same repo runs on different runner providers (github-hosted, namespace.so, self-hosted).
|
||||||
- `{{file_hash}}` - Hash of all mise configuration files
|
- `{{file_hash}}` - Hash of all mise configuration files
|
||||||
- `{{mise_env}}` - The MISE_ENV environment variable value
|
- `{{mise_env}}` - The MISE_ENV environment variable value
|
||||||
- `{{install_args_hash}}` - SHA256 hash of the sorted tools from install args
|
- `{{install_args_hash}}` - SHA256 hash of the sorted tools from install args
|
||||||
|
|
@ -78,18 +78,18 @@ Conditional logic is also supported using Handlebars syntax like `{{#if version}
|
||||||
|
|
||||||
Example using multiple variables:
|
Example using multiple variables:
|
||||||
```yaml
|
```yaml
|
||||||
- uses: jdx/mise-action@v3
|
- uses: jdx/mise-action@v4
|
||||||
with:
|
with:
|
||||||
cache_key: "mise-v1-{{platform}}-{{install_args_hash}}-{{file_hash}}"
|
cache_key: "mise-v1-{{platform}}-{{install_args_hash}}-{{file_hash}}"
|
||||||
install_args: "node@20 python@3.12"
|
install_args: "node@24 python@3.14"
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also extend the default cache key:
|
You can also extend the default cache key:
|
||||||
```yaml
|
```yaml
|
||||||
- uses: jdx/mise-action@v3
|
- uses: jdx/mise-action@v4
|
||||||
with:
|
with:
|
||||||
cache_key: "{{default}}-custom-suffix"
|
cache_key: "{{default}}-custom-suffix"
|
||||||
install_args: "node@20 python@3.12"
|
install_args: "node@24 python@3.14"
|
||||||
```
|
```
|
||||||
|
|
||||||
This gives you full control over cache invalidation based on the specific aspects that matter to your workflow.
|
This gives you full control over cache invalidation based on the specific aspects that matter to your workflow.
|
||||||
|
|
@ -99,7 +99,7 @@ This gives you full control over cache invalidation based on the specific aspect
|
||||||
When installing tools hosted on GitHub (like `gh`, `node`, `bun`, etc.), mise needs to make API calls to GitHub's releases API. Without authentication, these calls are subject to GitHub's rate limit of 60 requests per hour, which can cause installation failures.
|
When installing tools hosted on GitHub (like `gh`, `node`, `bun`, etc.), mise needs to make API calls to GitHub's releases API. Without authentication, these calls are subject to GitHub's rate limit of 60 requests per hour, which can cause installation failures.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: jdx/mise-action@v3
|
- uses: jdx/mise-action@v4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# your other configuration
|
# your other configuration
|
||||||
|
|
|
||||||
32
action.yml
32
action.yml
|
|
@ -85,9 +85,39 @@ inputs:
|
||||||
description: "Automatically load mise env vars into GITHUB_ENV. Note that PATH modifications are not part of this."
|
description: "Automatically load mise env vars into GITHUB_ENV. Note that PATH modifications are not part of this."
|
||||||
required: false
|
required: false
|
||||||
default: "true"
|
default: "true"
|
||||||
|
wings_enabled:
|
||||||
|
description: |
|
||||||
|
[experimental] Opt in to the mise-wings asset cache
|
||||||
|
(https://mise-wings.en.dev) for this action invocation.
|
||||||
|
|
||||||
|
When `true`, the action exports `MISE_WINGS_ENABLED=1` so
|
||||||
|
the installed mise binary routes tool-install URLs (npm
|
||||||
|
tarballs, GitHub release artifacts) through the per-org
|
||||||
|
wings cache subdomains.
|
||||||
|
|
||||||
|
Authentication is automatic via the runner's GitHub OIDC
|
||||||
|
identity — no `mise wings login` step, no long-lived
|
||||||
|
secret to rotate. The workflow must declare
|
||||||
|
`permissions: id-token: write` so the OIDC token-issuer
|
||||||
|
env vars are populated; without that, mise falls through
|
||||||
|
to direct-origin fetches transparently.
|
||||||
|
|
||||||
|
Default `false` is the conservative posture: a workflow
|
||||||
|
with `id-token: write` (used for SLSA / AWS-OIDC /
|
||||||
|
Sigstore / etc.) should not have its OIDC token sent to
|
||||||
|
a third-party cache without explicit opt-in. Older mise
|
||||||
|
binaries that don't speak wings ignore the env var
|
||||||
|
entirely, so this is forward-compatible.
|
||||||
|
|
||||||
|
Requires an active mise-wings subscription on the Clerk
|
||||||
|
org linked to the GitHub org running the workflow;
|
||||||
|
without one, the proxy 402s and mise leaves the cache
|
||||||
|
off without affecting the workflow's success.
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
outputs:
|
outputs:
|
||||||
cache-hit:
|
cache-hit:
|
||||||
description: A boolean value to indicate if a cache was hit.
|
description: A boolean value to indicate if a cache was hit.
|
||||||
runs:
|
runs:
|
||||||
using: node20
|
using: node24
|
||||||
main: dist/index.js
|
main: dist/index.js
|
||||||
|
|
|
||||||
199582
dist/index.js
generated
vendored
199582
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2500
dist/licenses.txt
generated
vendored
2500
dist/licenses.txt
generated
vendored
File diff suppressed because it is too large
Load diff
1
dist/sourcemap-register.js
generated
vendored
1
dist/sourcemap-register.js
generated
vendored
File diff suppressed because one or more lines are too long
166
mise.lock
Normal file
166
mise.lock
Normal file
|
|
@ -0,0 +1,166 @@
|
||||||
|
# @generated - this file is auto-generated by `mise lock` https://mise.en.dev/dev-tools/mise-lock.html
|
||||||
|
|
||||||
|
[[tools.aube]]
|
||||||
|
version = "1.6.2"
|
||||||
|
backend = "github:endevco/aube"
|
||||||
|
|
||||||
|
[tools.aube."platforms.linux-arm64"]
|
||||||
|
checksum = "sha256:1c47d2c0a50cf80f49aedcc2f58ce8abcbdf763092e772c8961c6e5b18916e8b"
|
||||||
|
url = "https://github.com/endevco/aube/releases/download/v1.6.2/aube-v1.6.2-aarch64-unknown-linux-gnu.tar.gz"
|
||||||
|
url_api = "https://api.github.com/repos/endevco/aube/releases/assets/410164231"
|
||||||
|
provenance = "github-attestations"
|
||||||
|
|
||||||
|
[tools.aube."platforms.linux-arm64-musl"]
|
||||||
|
checksum = "sha256:9780776921db3a54fc3237f50b9686489d93115e26584c7a85d54ce96a8e9b39"
|
||||||
|
url = "https://github.com/endevco/aube/releases/download/v1.6.2/aube-v1.6.2-aarch64-unknown-linux-musl.tar.gz"
|
||||||
|
url_api = "https://api.github.com/repos/endevco/aube/releases/assets/410164229"
|
||||||
|
provenance = "github-attestations"
|
||||||
|
|
||||||
|
[tools.aube."platforms.linux-x64"]
|
||||||
|
checksum = "sha256:16fcc40dfbaac110ce8f4e88728a440f2366094a45fd6c189bcbcc2b3ea31f06"
|
||||||
|
url = "https://github.com/endevco/aube/releases/download/v1.6.2/aube-v1.6.2-x86_64-unknown-linux-gnu.tar.gz"
|
||||||
|
url_api = "https://api.github.com/repos/endevco/aube/releases/assets/410164107"
|
||||||
|
provenance = "github-attestations"
|
||||||
|
|
||||||
|
[tools.aube."platforms.linux-x64-musl"]
|
||||||
|
checksum = "sha256:2ee3821fd62b56bb39cb2ceffe6ad38975e35f82311ca7f9ec6ee28bc6d284b8"
|
||||||
|
url = "https://github.com/endevco/aube/releases/download/v1.6.2/aube-v1.6.2-x86_64-unknown-linux-musl.tar.gz"
|
||||||
|
url_api = "https://api.github.com/repos/endevco/aube/releases/assets/410164199"
|
||||||
|
provenance = "github-attestations"
|
||||||
|
|
||||||
|
[tools.aube."platforms.macos-arm64"]
|
||||||
|
checksum = "sha256:4ce92482500f77f0779f288328cb7411f7ae2441b8618eae36a2ab5ea7591a32"
|
||||||
|
url = "https://github.com/endevco/aube/releases/download/v1.6.2/aube-v1.6.2-aarch64-apple-darwin.tar.gz"
|
||||||
|
url_api = "https://api.github.com/repos/endevco/aube/releases/assets/410166750"
|
||||||
|
provenance = "github-attestations"
|
||||||
|
|
||||||
|
[tools.aube."platforms.windows-x64"]
|
||||||
|
checksum = "sha256:916594efae8f8b59fc898913f96d199a21d212c7037043853ee04df7264611d0"
|
||||||
|
url = "https://github.com/endevco/aube/releases/download/v1.6.2/aube-v1.6.2-x86_64-pc-windows-msvc.zip"
|
||||||
|
url_api = "https://api.github.com/repos/endevco/aube/releases/assets/410174742"
|
||||||
|
provenance = "github-attestations"
|
||||||
|
|
||||||
|
[[tools.communique]]
|
||||||
|
version = "1.1.2"
|
||||||
|
backend = "github:jdx/communique"
|
||||||
|
|
||||||
|
[tools.communique."platforms.linux-arm64"]
|
||||||
|
checksum = "sha256:7bb0843207fc3d7b5df2a5c0198bb10539cf13a6b247b4adfbf6b302a68f03de"
|
||||||
|
url = "https://github.com/jdx/communique/releases/download/v1.1.2/communique-aarch64-unknown-linux-gnu.tar.gz"
|
||||||
|
url_api = "https://api.github.com/repos/jdx/communique/releases/assets/405964161"
|
||||||
|
|
||||||
|
[tools.communique."platforms.linux-arm64-musl"]
|
||||||
|
checksum = "sha256:b663407be77a370c209df40307b82e436f56a6bc23d4e423510d62ac6e1fedf4"
|
||||||
|
url = "https://github.com/jdx/communique/releases/download/v1.1.2/communique-aarch64-unknown-linux-musl.tar.gz"
|
||||||
|
url_api = "https://api.github.com/repos/jdx/communique/releases/assets/405964743"
|
||||||
|
|
||||||
|
[tools.communique."platforms.linux-x64"]
|
||||||
|
checksum = "sha256:5e74ead7037f42940c7dba4f6aa4ed968920cbb55a047aa0d291b0c675c65676"
|
||||||
|
url = "https://github.com/jdx/communique/releases/download/v1.1.2/communique-x86_64-unknown-linux-gnu.tar.gz"
|
||||||
|
url_api = "https://api.github.com/repos/jdx/communique/releases/assets/405963914"
|
||||||
|
provenance = "github-attestations"
|
||||||
|
|
||||||
|
[tools.communique."platforms.linux-x64-musl"]
|
||||||
|
checksum = "sha256:01a6a8b49e635a5a209fdaf6c7b2e976374debc2db1c846c033f567fdba0d86c"
|
||||||
|
url = "https://github.com/jdx/communique/releases/download/v1.1.2/communique-x86_64-unknown-linux-musl.tar.gz"
|
||||||
|
url_api = "https://api.github.com/repos/jdx/communique/releases/assets/405964691"
|
||||||
|
|
||||||
|
[tools.communique."platforms.macos-arm64"]
|
||||||
|
checksum = "sha256:459993e31a6c4ccbd09882f5679a2bc1ea5d9068701ecefc411a00fb69ce82e6"
|
||||||
|
url = "https://github.com/jdx/communique/releases/download/v1.1.2/communique-aarch64-apple-darwin.tar.gz"
|
||||||
|
url_api = "https://api.github.com/repos/jdx/communique/releases/assets/405964098"
|
||||||
|
|
||||||
|
[tools.communique."platforms.windows-x64"]
|
||||||
|
checksum = "sha256:3cc0e880ac2168aed3163223627bbd1eee62e07a9901cb85cb507c6c8927bc93"
|
||||||
|
url = "https://github.com/jdx/communique/releases/download/v1.1.2/communique-x86_64-pc-windows-msvc.zip"
|
||||||
|
url_api = "https://api.github.com/repos/jdx/communique/releases/assets/405964430"
|
||||||
|
|
||||||
|
[[tools.gh]]
|
||||||
|
version = "2.92.0"
|
||||||
|
backend = "aqua:cli/cli"
|
||||||
|
|
||||||
|
[tools.gh."platforms.linux-arm64"]
|
||||||
|
checksum = "sha256:c2248526dd0160c08d3fccca2332c3c1a07c15a78b23978e77735f1b5a18cfee"
|
||||||
|
url = "https://github.com/cli/cli/releases/download/v2.92.0/gh_2.92.0_linux_arm64.tar.gz"
|
||||||
|
provenance = "github-attestations"
|
||||||
|
|
||||||
|
[tools.gh."platforms.linux-arm64-musl"]
|
||||||
|
checksum = "sha256:c2248526dd0160c08d3fccca2332c3c1a07c15a78b23978e77735f1b5a18cfee"
|
||||||
|
url = "https://github.com/cli/cli/releases/download/v2.92.0/gh_2.92.0_linux_arm64.tar.gz"
|
||||||
|
provenance = "github-attestations"
|
||||||
|
|
||||||
|
[tools.gh."platforms.linux-x64"]
|
||||||
|
checksum = "sha256:b57848131bdf0c229cd35e1f2a51aa718199858b2e728410b37e89a428943ec4"
|
||||||
|
url = "https://github.com/cli/cli/releases/download/v2.92.0/gh_2.92.0_linux_amd64.tar.gz"
|
||||||
|
provenance = "github-attestations"
|
||||||
|
|
||||||
|
[tools.gh."platforms.linux-x64-musl"]
|
||||||
|
checksum = "sha256:b57848131bdf0c229cd35e1f2a51aa718199858b2e728410b37e89a428943ec4"
|
||||||
|
url = "https://github.com/cli/cli/releases/download/v2.92.0/gh_2.92.0_linux_amd64.tar.gz"
|
||||||
|
provenance = "github-attestations"
|
||||||
|
|
||||||
|
[tools.gh."platforms.macos-arm64"]
|
||||||
|
checksum = "sha256:b11c54f6bd7d15ed6590475079e5b2fcf36f45d3991a80041b29c9d0cc1f1d07"
|
||||||
|
url = "https://github.com/cli/cli/releases/download/v2.92.0/gh_2.92.0_macOS_arm64.zip"
|
||||||
|
provenance = "github-attestations"
|
||||||
|
|
||||||
|
[tools.gh."platforms.windows-x64"]
|
||||||
|
checksum = "sha256:b6a8df3c8c6b9c80f290906387673bc4d272840f3789c5650e0e4e6e75522785"
|
||||||
|
url = "https://github.com/cli/cli/releases/download/v2.92.0/gh_2.92.0_windows_amd64.zip"
|
||||||
|
provenance = "github-attestations"
|
||||||
|
|
||||||
|
[[tools.git-cliff]]
|
||||||
|
version = "2.13.1"
|
||||||
|
backend = "aqua:orhun/git-cliff"
|
||||||
|
|
||||||
|
[tools.git-cliff."platforms.linux-arm64"]
|
||||||
|
checksum = "sha256:4054c124b926c117f3fa048939bc8be0a954f29f3b6f367627e8cb22c1971882"
|
||||||
|
url = "https://github.com/orhun/git-cliff/releases/download/v2.13.1/git-cliff-2.13.1-aarch64-unknown-linux-musl.tar.gz"
|
||||||
|
|
||||||
|
[tools.git-cliff."platforms.linux-arm64-musl"]
|
||||||
|
checksum = "sha256:4054c124b926c117f3fa048939bc8be0a954f29f3b6f367627e8cb22c1971882"
|
||||||
|
url = "https://github.com/orhun/git-cliff/releases/download/v2.13.1/git-cliff-2.13.1-aarch64-unknown-linux-musl.tar.gz"
|
||||||
|
|
||||||
|
[tools.git-cliff."platforms.linux-x64"]
|
||||||
|
checksum = "sha256:200d2535da6d9703f3bcc8a4d159c3b55eacdb01cf2148c55b3eee9dd04d5249"
|
||||||
|
url = "https://github.com/orhun/git-cliff/releases/download/v2.13.1/git-cliff-2.13.1-x86_64-unknown-linux-musl.tar.gz"
|
||||||
|
|
||||||
|
[tools.git-cliff."platforms.linux-x64-musl"]
|
||||||
|
checksum = "sha256:200d2535da6d9703f3bcc8a4d159c3b55eacdb01cf2148c55b3eee9dd04d5249"
|
||||||
|
url = "https://github.com/orhun/git-cliff/releases/download/v2.13.1/git-cliff-2.13.1-x86_64-unknown-linux-musl.tar.gz"
|
||||||
|
|
||||||
|
[tools.git-cliff."platforms.macos-arm64"]
|
||||||
|
checksum = "sha256:21547ae4a0421164070ab75c2522864ea5565858a011fabc5f583061b20f1226"
|
||||||
|
url = "https://github.com/orhun/git-cliff/releases/download/v2.13.1/git-cliff-2.13.1-aarch64-apple-darwin.tar.gz"
|
||||||
|
|
||||||
|
[tools.git-cliff."platforms.windows-x64"]
|
||||||
|
checksum = "sha256:3ae3a5549e85c7ad5b20192ebcfee4371269deca51255f6f2f2e051c6541f5ca"
|
||||||
|
url = "https://github.com/orhun/git-cliff/releases/download/v2.13.1/git-cliff-2.13.1-x86_64-pc-windows-msvc.zip"
|
||||||
|
|
||||||
|
[[tools.node]]
|
||||||
|
version = "24.15.0"
|
||||||
|
backend = "core:node"
|
||||||
|
|
||||||
|
[tools.node."platforms.linux-arm64"]
|
||||||
|
checksum = "sha256:73afc234d558c24919875f51c2d1ea002a2ada4ea6f83601a383869fefa64eed"
|
||||||
|
url = "https://nodejs.org/dist/v24.15.0/node-v24.15.0-linux-arm64.tar.gz"
|
||||||
|
|
||||||
|
[tools.node."platforms.linux-arm64-musl"]
|
||||||
|
checksum = "sha256:31e98aa960a067da91edffd5d93bc46657b5d2a8029612c359f5f2ac0060152a"
|
||||||
|
url = "https://unofficial-builds.nodejs.org/download/release/v24.15.0/node-v24.15.0-linux-arm64-musl.tar.gz"
|
||||||
|
|
||||||
|
[tools.node."platforms.linux-x64"]
|
||||||
|
checksum = "sha256:44836872d9aec49f1e6b52a9a922872db9a2b02d235a616a5681b6a85fec8d89"
|
||||||
|
url = "https://nodejs.org/dist/v24.15.0/node-v24.15.0-linux-x64.tar.gz"
|
||||||
|
|
||||||
|
[tools.node."platforms.linux-x64-musl"]
|
||||||
|
checksum = "sha256:f55af5bd489c5347b113ca6594cae00a54b30ba57ac5875324311bfc6f4762e3"
|
||||||
|
url = "https://unofficial-builds.nodejs.org/download/release/v24.15.0/node-v24.15.0-linux-x64-musl.tar.gz"
|
||||||
|
|
||||||
|
[tools.node."platforms.macos-arm64"]
|
||||||
|
checksum = "sha256:372331b969779ab5d15b949884fc6eaf88d5afe87bde8ba881d6400b9100ffc4"
|
||||||
|
url = "https://nodejs.org/dist/v24.15.0/node-v24.15.0-darwin-arm64.tar.gz"
|
||||||
|
|
||||||
|
[tools.node."platforms.windows-x64"]
|
||||||
|
checksum = "sha256:cc5149eabd53779ce1e7bdc5401643622d0c7e6800ade18928a767e940bb0e62"
|
||||||
|
url = "https://nodejs.org/dist/v24.15.0/node-v24.15.0-win-x64.zip"
|
||||||
12
mise.toml
12
mise.toml
|
|
@ -1,12 +1,14 @@
|
||||||
tasks.pre-commit = ["npm run all", "git add dist"]
|
tasks.pre-commit = ["aubr all", "git add dist"]
|
||||||
tasks.test.alias = ["t"]
|
tasks.test.alias = ["t"]
|
||||||
tasks.test.run = ["npm run all"]
|
tasks.test.run = ["aubr all"]
|
||||||
tasks.lint = "bun run lint"
|
tasks.lint = "aubr lint"
|
||||||
tasks."lint:fix" = "bun run format:write"
|
tasks."lint:fix" = "aubr format:write"
|
||||||
tasks.version = "npm version"
|
tasks.version = "aube version"
|
||||||
tasks.release-plz = "./scripts/release-plz.sh"
|
tasks.release-plz = "./scripts/release-plz.sh"
|
||||||
|
|
||||||
[tools]
|
[tools]
|
||||||
node = '24'
|
node = '24'
|
||||||
|
aube = 'v1.6.2'
|
||||||
git-cliff = 'latest'
|
git-cliff = 'latest'
|
||||||
gh = 'latest'
|
gh = 'latest'
|
||||||
|
communique = 'latest'
|
||||||
|
|
|
||||||
3198
package-lock.json
generated
3198
package-lock.json
generated
File diff suppressed because it is too large
Load diff
37
package.json
37
package.json
|
|
@ -1,8 +1,9 @@
|
||||||
{
|
{
|
||||||
"name": "mise-action",
|
"name": "mise-action",
|
||||||
"description": "mise tool setup action",
|
"description": "mise tool setup action",
|
||||||
"version": "3.6.3",
|
"version": "4.0.1",
|
||||||
"author": "jdx",
|
"author": "jdx",
|
||||||
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
@ -21,34 +22,46 @@
|
||||||
"bundle": "npm run format:write && npm run package",
|
"bundle": "npm run format:write && npm run package",
|
||||||
"format:check": "prettier --check **/*.ts",
|
"format:check": "prettier --check **/*.ts",
|
||||||
"format:write": "prettier --write **/*.ts",
|
"format:write": "prettier --write **/*.ts",
|
||||||
"lint": "npx eslint . && npm run format:check",
|
"lint": "eslint . && npm run format:check",
|
||||||
"package": "ncc build -s src/index.ts --license licenses.txt",
|
"package": "rimraf ./dist && rollup --config rollup.config.mjs",
|
||||||
"package:watch": "npm run package -- --watch",
|
"package:watch": "npm run package -- --watch",
|
||||||
"version": "./scripts/version.sh",
|
"version": "./scripts/version.sh",
|
||||||
"prepare": "husky"
|
"prepare": "husky"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^4.0.0",
|
"@actions/cache": "^6.0.0",
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^3.0.0",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^3.0.0",
|
||||||
"@actions/glob": "^0.5.0",
|
"@actions/glob": "^0.7.0",
|
||||||
|
"@actions/io": "^3.0.0",
|
||||||
"@types/handlebars": "^4.0.40",
|
"@types/handlebars": "^4.0.40",
|
||||||
"handlebars": "^4.7.8"
|
"handlebars": "^4.7.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/eslintrc": "^3.2.0",
|
"@eslint/eslintrc": "^3.2.0",
|
||||||
"@eslint/js": "^9.15.0",
|
"@eslint/js": "^10.0.0",
|
||||||
|
"@rollup/plugin-commonjs": "^29.0.0",
|
||||||
|
"@rollup/plugin-json": "^6.1.0",
|
||||||
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
||||||
|
"@rollup/plugin-typescript": "^12.0.0",
|
||||||
"@types/eslint__js": "^8.42.3",
|
"@types/eslint__js": "^8.42.3",
|
||||||
"@types/node": "^24",
|
"@types/node": "^24",
|
||||||
"@vercel/ncc": "^0.38.3",
|
"eslint": "^10.0.0",
|
||||||
"eslint": "^9.15.0",
|
"globals": "^17.0.0",
|
||||||
"globals": "^16.0.0",
|
|
||||||
"husky": "^9.1.7",
|
"husky": "^9.1.7",
|
||||||
"jest": "^30",
|
"jest": "^30",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"prettier": "^3.4.1",
|
"prettier": "^3.4.1",
|
||||||
"typescript": "^5.7.2",
|
"rimraf": "^6.0.0",
|
||||||
|
"rollup": "^4.0.0",
|
||||||
|
"rollup-plugin-license": "^3.7.1",
|
||||||
|
"typescript": "^6.0.0",
|
||||||
"typescript-eslint": "^8.16.0"
|
"typescript-eslint": "^8.16.0"
|
||||||
|
},
|
||||||
|
"aube": {
|
||||||
|
"allowBuilds": {
|
||||||
|
"unrs-resolver": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
29
rollup.config.mjs
Normal file
29
rollup.config.mjs
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
import commonjs from '@rollup/plugin-commonjs'
|
||||||
|
import json from '@rollup/plugin-json'
|
||||||
|
import nodeResolve from '@rollup/plugin-node-resolve'
|
||||||
|
import typescript from '@rollup/plugin-typescript'
|
||||||
|
import license from 'rollup-plugin-license'
|
||||||
|
import path from 'path'
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
input: 'src/index.ts',
|
||||||
|
output: {
|
||||||
|
esModule: true,
|
||||||
|
file: 'dist/index.js',
|
||||||
|
format: 'es',
|
||||||
|
sourcemap: true
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
typescript(),
|
||||||
|
nodeResolve({ preferBuiltins: true }),
|
||||||
|
commonjs({ ignoreTryCatch: false }),
|
||||||
|
json(),
|
||||||
|
license({
|
||||||
|
thirdParty: {
|
||||||
|
output: path.resolve('dist', 'licenses.txt')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
export default config
|
||||||
|
|
@ -4,6 +4,11 @@ set -euxo pipefail
|
||||||
VERSION=$(jq -r .version package.json)
|
VERSION=$(jq -r .version package.json)
|
||||||
MAJOR_VERSION=$(echo "$VERSION" | cut -d. -f1)
|
MAJOR_VERSION=$(echo "$VERSION" | cut -d. -f1)
|
||||||
|
|
||||||
|
# Configure git to use gh's credential helper. The checkout step uses
|
||||||
|
# persist-credentials: false (per zizmor's artipacked audit), so the
|
||||||
|
# token isn't written to .git/config and raw `git push` would 403.
|
||||||
|
gh auth setup-git
|
||||||
|
|
||||||
# create the version tag (allow it to fail if it already exists)
|
# create the version tag (allow it to fail if it already exists)
|
||||||
git tag "v$VERSION" || echo "Tag v$VERSION already exists locally"
|
git tag "v$VERSION" || echo "Tag v$VERSION already exists locally"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,11 @@ if [ -n "$latest_release_version" ] && [ "$cur_pkg_version" = "$latest_release_v
|
||||||
git config user.name mise-en-dev
|
git config user.name mise-en-dev
|
||||||
git config user.email 123107610+mise-en-dev@users.noreply.github.com
|
git config user.email 123107610+mise-en-dev@users.noreply.github.com
|
||||||
|
|
||||||
|
# Configure git to use gh's credential helper. The checkout step uses
|
||||||
|
# persist-credentials: false (per zizmor's artipacked audit), so the
|
||||||
|
# token isn't written to .git/config and raw `git push` would 403.
|
||||||
|
gh auth setup-git
|
||||||
|
|
||||||
# Create a PR with the version bump
|
# Create a PR with the version bump
|
||||||
npm version "${version#v}" --no-git-tag-version
|
npm version "${version#v}" --no-git-tag-version
|
||||||
|
|
||||||
|
|
|
||||||
100
src/index.ts
100
src/index.ts
|
|
@ -54,6 +54,25 @@ async function run(): Promise<void> {
|
||||||
core.setOutput('cache-hit', false)
|
core.setOutput('cache-hit', false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Wings opt-in hook (experimental). When
|
||||||
|
// `wings_enabled: true` is set, this exports
|
||||||
|
// `MISE_WINGS_ENABLED=1` so subsequent `mise install`
|
||||||
|
// commands in this workflow route through the wings
|
||||||
|
// cache. Default `false` so workflows with
|
||||||
|
// `id-token: write` (used for SLSA / AWS-OIDC / Sigstore /
|
||||||
|
// etc.) don't silently send the runner's OIDC token to
|
||||||
|
// a third-party cache without explicit consent.
|
||||||
|
//
|
||||||
|
// Note: `setupMise` fetches the mise binary itself with
|
||||||
|
// `curl`, which doesn't go through mise's HTTP layer —
|
||||||
|
// the wings rewriter only kicks in once the resulting
|
||||||
|
// mise binary runs `mise install` and friends. Ordering
|
||||||
|
// here is irrelevant for binary acceleration; we just
|
||||||
|
// want the env var set before any `mise` subcommand
|
||||||
|
// runs. Greptile + Gemini both flagged the previous
|
||||||
|
// comment as overstating what the early call accelerates.
|
||||||
|
setupWings()
|
||||||
|
|
||||||
const version = core.getInput('version')
|
const version = core.getInput('version')
|
||||||
const fetchFromGitHub = core.getBooleanInput('fetch_from_github')
|
const fetchFromGitHub = core.getBooleanInput('fetch_from_github')
|
||||||
await setupMise(version, fetchFromGitHub)
|
await setupMise(version, fetchFromGitHub)
|
||||||
|
|
@ -79,13 +98,53 @@ async function run(): Promise<void> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Opt in to mise-wings caching for this workflow run. When
|
||||||
|
* `wings_enabled: true`, exports `MISE_WINGS_ENABLED=1` so
|
||||||
|
* subsequent `mise install` commands route through the
|
||||||
|
* cache.
|
||||||
|
*
|
||||||
|
* Mise itself owns the OIDC → wings session exchange — when
|
||||||
|
* it sees `MISE_WINGS_ENABLED=1` and the GHA OIDC env vars
|
||||||
|
* (`ACTIONS_ID_TOKEN_REQUEST_URL` +
|
||||||
|
* `ACTIONS_ID_TOKEN_REQUEST_TOKEN`), it fetches the runner's
|
||||||
|
* OIDC token, exchanges it at the proxy's `POST /auth`
|
||||||
|
* route, and caches the resulting session JWT for the rest
|
||||||
|
* of the process.
|
||||||
|
*
|
||||||
|
* Pre-flight check: `id-token: write` permission must be
|
||||||
|
* declared at the workflow or job level for the OIDC env
|
||||||
|
* vars to be present. We log a warning when wings is
|
||||||
|
* enabled but the env vars are absent — without this hint,
|
||||||
|
* the user sees a transparent "wings configured but doing
|
||||||
|
* nothing" which is hard to debug.
|
||||||
|
*/
|
||||||
|
function setupWings(): void {
|
||||||
|
if (!core.getBooleanInput('wings_enabled')) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
core.exportVariable('MISE_WINGS_ENABLED', '1')
|
||||||
|
core.info(
|
||||||
|
"mise-wings: enabled. mise will exchange the runner's OIDC token for a wings session on first use."
|
||||||
|
)
|
||||||
|
|
||||||
|
const oidcUrl = process.env.ACTIONS_ID_TOKEN_REQUEST_URL
|
||||||
|
const oidcToken = process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN
|
||||||
|
if (!oidcUrl || !oidcToken) {
|
||||||
|
core.warning(
|
||||||
|
'mise-wings: GHA OIDC env vars are missing. Add ' +
|
||||||
|
'`permissions: id-token: write` at the workflow or job ' +
|
||||||
|
'level so the runner can mint OIDC tokens. Without this, ' +
|
||||||
|
'mise falls through to direct-origin fetches and the cache ' +
|
||||||
|
'is bypassed.'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function exportMiseEnv(): Promise<void> {
|
async function exportMiseEnv(): Promise<void> {
|
||||||
core.startGroup('Exporting mise environment variables')
|
core.startGroup('Exporting mise environment variables')
|
||||||
|
|
||||||
const cwd =
|
const cwd = getCwd()
|
||||||
core.getInput('working_directory') ||
|
|
||||||
core.getInput('install_dir') ||
|
|
||||||
process.cwd()
|
|
||||||
|
|
||||||
// Check if mise supports --redacted flags based on version input
|
// Check if mise supports --redacted flags based on version input
|
||||||
const supportsRedacted = checkMiseSupportsRedacted()
|
const supportsRedacted = checkMiseSupportsRedacted()
|
||||||
|
|
@ -356,10 +415,7 @@ const miseLs = async (): Promise<number> => mise([`ls`])
|
||||||
const miseReshim = async (): Promise<number> => mise([`reshim`, `-f`])
|
const miseReshim = async (): Promise<number> => mise([`reshim`, `-f`])
|
||||||
const mise = async (args: string[]): Promise<number> =>
|
const mise = async (args: string[]): Promise<number> =>
|
||||||
await core.group(`Running mise ${args.join(' ')}`, async () => {
|
await core.group(`Running mise ${args.join(' ')}`, async () => {
|
||||||
const cwd =
|
const cwd = getCwd()
|
||||||
core.getInput('working_directory') ||
|
|
||||||
core.getInput('install_dir') ||
|
|
||||||
process.cwd()
|
|
||||||
const baseEnv = Object.fromEntries(
|
const baseEnv = Object.fromEntries(
|
||||||
Object.entries(process.env).filter(
|
Object.entries(process.env).filter(
|
||||||
(entry): entry is [string, string] => entry[1] !== undefined
|
(entry): entry is [string, string] => entry[1] !== undefined
|
||||||
|
|
@ -387,6 +443,14 @@ const writeFile = async (p: fs.PathLike, body: string): Promise<void> =>
|
||||||
|
|
||||||
run()
|
run()
|
||||||
|
|
||||||
|
function getCwd(): string {
|
||||||
|
return (
|
||||||
|
core.getInput('working_directory') ||
|
||||||
|
core.getInput('install_dir') ||
|
||||||
|
process.cwd()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
function miseDir(): string {
|
function miseDir(): string {
|
||||||
const dir = core.getState('MISE_DIR')
|
const dir = core.getState('MISE_DIR')
|
||||||
if (dir) return dir
|
if (dir) return dir
|
||||||
|
|
@ -419,11 +483,7 @@ async function saveCache(cacheKey: string): Promise<void> {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getTarget(): Promise<string> {
|
async function getTarget(): Promise<string> {
|
||||||
let { arch } = process
|
const arch = process.arch === 'arm' ? 'armv7' : process.arch
|
||||||
|
|
||||||
// quick overwrite to abide by release format
|
|
||||||
if (arch === 'arm') arch = 'armv7' as NodeJS.Architecture
|
|
||||||
|
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case 'darwin':
|
case 'darwin':
|
||||||
return `macos-${arch}`
|
return `macos-${arch}`
|
||||||
|
|
@ -436,13 +496,25 @@ async function getTarget(): Promise<string> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Identifies the runner image so cached binaries from one provider
|
||||||
|
* (github-hosted, namespace.so, BuildJet, self-hosted) aren't restored
|
||||||
|
* onto another provider's image where their compiled-in paths and libc
|
||||||
|
* versions don't match. GitHub-hosted images export `ImageOS`
|
||||||
|
* (e.g. "macos15", "ubuntu24"); other runners leave it unset and pool
|
||||||
|
* under "self-hosted".
|
||||||
|
*/
|
||||||
|
function getRunnerImageId(): string {
|
||||||
|
return process.env.ImageOS || 'self-hosted'
|
||||||
|
}
|
||||||
|
|
||||||
async function processCacheKeyTemplate(template: string): Promise<string> {
|
async function processCacheKeyTemplate(template: string): Promise<string> {
|
||||||
// Get all available variables
|
// Get all available variables
|
||||||
const version = core.getInput('version')
|
const version = core.getInput('version')
|
||||||
const installArgs = core.getInput('install_args')
|
const installArgs = core.getInput('install_args')
|
||||||
const cacheKeyPrefix = core.getInput('cache_key_prefix') || 'mise-v1'
|
const cacheKeyPrefix = core.getInput('cache_key_prefix') || 'mise-v1'
|
||||||
const miseEnv = process.env.MISE_ENV?.replace(/,/g, '-')
|
const miseEnv = process.env.MISE_ENV?.replace(/,/g, '-')
|
||||||
const platform = await getTarget()
|
const platform = `${await getTarget()}-${getRunnerImageId()}`
|
||||||
|
|
||||||
// Calculate file hash
|
// Calculate file hash
|
||||||
const fileHash = await glob.hashFiles(MISE_CONFIG_FILE_PATTERNS.join('\n'))
|
const fileHash = await glob.hashFiles(MISE_CONFIG_FILE_PATTERNS.join('\n'))
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,9 @@
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"newLine": "lf"
|
"newLine": "lf",
|
||||||
|
"isolatedModules": true,
|
||||||
|
"allowSyntheticDefaultImports": true
|
||||||
},
|
},
|
||||||
"exclude": ["./dist", "./node_modules", "./__tests__", "./coverage"]
|
"exclude": ["./dist", "./node_modules", "./__tests__", "./coverage"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue