diff --git a/.github/actions/setup-mise/action.yml b/.github/actions/setup-mise/action.yml new file mode 100644 index 0000000..726bd42 --- /dev/null +++ b/.github/actions/setup-mise/action.yml @@ -0,0 +1,11 @@ +name: "Setup mise" +description: "A composite action to setup mise-en-place tool manager" + +runs: + using: "composite" + steps: + - name: Setup mise + uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1 + with: + install: true + cache: true diff --git a/.github/actions/setup-pnpm-demos-npm/action.yml b/.github/actions/setup-pnpm-demos-npm/action.yml index 2489bf7..35b8c03 100644 --- a/.github/actions/setup-pnpm-demos-npm/action.yml +++ b/.github/actions/setup-pnpm-demos-npm/action.yml @@ -7,15 +7,19 @@ runs: - name: Get Node.js version id: get-node-version shell: bash - run: echo "node_version=$(grep node .tool-versions | cut -d' ' -f2)" >> $GITHUB_OUTPUT + run: echo "node_version=$(grep '^node' mise.toml | sed 's/.*= *\"\(.*\)\"/\1/')" >> $GITHUB_OUTPUT - name: Setup Node uses: actions/setup-node@v4 with: node-version: ${{ steps.get-node-version.outputs.node_version }} + - name: Get pnpm version + id: get-pnpm-version + shell: bash + run: echo "pnpm_version=$(grep 'pnpm' mise.toml | sed 's/.*= *\"\(.*\)\"/\1/')" >> $GITHUB_OUTPUT - name: Install pnpm uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 with: - version: 10.11.0 + version: ${{ steps.get-pnpm-version.outputs.pnpm_version }} - name: Get pnpm store directory id: pnpm-cache shell: bash diff --git a/.github/actions/setup-pnpm-demos-react/action.yml b/.github/actions/setup-pnpm-demos-react/action.yml index 8af94f5..a854d73 100644 --- a/.github/actions/setup-pnpm-demos-react/action.yml +++ b/.github/actions/setup-pnpm-demos-react/action.yml @@ -7,15 +7,19 @@ runs: - name: Get Node.js version id: get-node-version shell: bash - run: echo "node_version=$(grep node .tool-versions | cut -d' ' -f2)" >> $GITHUB_OUTPUT + run: echo "node_version=$(grep '^node' mise.toml | sed 's/.*= *\"\(.*\)\"/\1/')" >> $GITHUB_OUTPUT - name: Setup Node uses: actions/setup-node@v4 with: node-version: ${{ steps.get-node-version.outputs.node_version }} + - name: Get pnpm version + id: get-pnpm-version + shell: bash + run: echo "pnpm_version=$(grep 'pnpm' mise.toml | sed 's/.*= *\"\(.*\)\"/\1/')" >> $GITHUB_OUTPUT - name: Install pnpm uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 with: - version: 10.11.0 + version: ${{ steps.get-pnpm-version.outputs.pnpm_version }} - name: Get pnpm store directory id: pnpm-cache shell: bash diff --git a/.github/actions/setup-pnpm/action.yml b/.github/actions/setup-pnpm/action.yml index 88f433c..6b18fb6 100644 --- a/.github/actions/setup-pnpm/action.yml +++ b/.github/actions/setup-pnpm/action.yml @@ -7,15 +7,19 @@ runs: - name: Get Node.js version id: get-node-version shell: bash - run: echo "node_version=$(grep node .tool-versions | cut -d' ' -f2)" >> $GITHUB_OUTPUT + run: echo "node_version=$(grep '^node' mise.toml | sed 's/.*= *\"\(.*\)\"/\1/')" >> $GITHUB_OUTPUT - name: Setup Node uses: actions/setup-node@v4 with: node-version: ${{ steps.get-node-version.outputs.node_version }} + - name: Get pnpm version + id: get-pnpm-version + shell: bash + run: echo "pnpm_version=$(grep 'pnpm' mise.toml | sed 's/.*= *\"\(.*\)\"/\1/')" >> $GITHUB_OUTPUT - name: Install pnpm uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 with: - version: 10.11.0 + version: ${{ steps.get-pnpm-version.outputs.pnpm_version }} - name: Get pnpm store directory id: pnpm-cache shell: bash diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2e794d..242f611 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,8 +34,8 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Install asdf CLI - uses: asdf-vm/actions/install@1117842ea70e2711a0072e3a71265cbfe2c830be + - name: Setup mise + uses: ./.github/actions/setup-mise # We need to determine which versions to update based on the new version # - In case of a pre-release, only update vX.Y.Z-{prerel} diff --git a/.tool-versions b/.tool-versions deleted file mode 100644 index d9c2226..0000000 --- a/.tool-versions +++ /dev/null @@ -1,5 +0,0 @@ -nodejs 22.12.0 -semver 3.3.0 -mkcert 1.4.4 -pre-commit 4.0.1 -pnpm 10.11.0 diff --git a/Makefile b/Makefile index 5f800e9..8015751 100644 --- a/Makefile +++ b/Makefile @@ -78,11 +78,8 @@ certs: mkcert -install mkcert -cert-file nginx/tls/cert.pem -key-file nginx/tls/key.pem localhost -.PHONY: asdf -asdf: - -asdf plugin add nodejs - -asdf plugin add semver - -asdf plugin add mkcert - asdf install +.PHONY: mise +mise: + mise install -all: asdf certs test build demos +all: mise certs test build demos diff --git a/mise.lock b/mise.lock new file mode 100644 index 0000000..30c400d --- /dev/null +++ b/mise.lock @@ -0,0 +1,30 @@ +[[tools.mkcert]] +version = "1.4.4" +backend = "aqua:FiloSottile/mkcert" +"platforms.linux-arm64" = { url = "https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-linux-arm64"} +"platforms.linux-x64" = { url = "https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-linux-amd64"} +"platforms.macos-arm64" = { url = "https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-darwin-arm64"} +"platforms.macos-x64" = { url = "https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-darwin-amd64"} +"platforms.windows-x64" = { url = "https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-windows-amd64.exe"} + +[[tools.node]] +version = "22.12.0" +backend = "core:node" +"platforms.linux-arm64" = { checksum = "sha256:9e7905fdee722f9650a03ae644b51c4c6effd3b98ac93c588700072ab35c9ddb", url = "https://nodejs.org/dist/v22.12.0/node-v22.12.0-linux-arm64.tar.gz"} +"platforms.linux-x64" = { checksum = "sha256:e05a4d65232ae2b27b3d77da2e368522fb46b923335b8e0d5f77624c32484044", url = "https://nodejs.org/dist/v22.12.0/node-v22.12.0-linux-x64.tar.gz"} +"platforms.macos-arm64" = { checksum = "sha256:293dcc6c2408da21562d135b0412525e381bb6fe150d688edb58fe850d0f3e13", url = "https://nodejs.org/dist/v22.12.0/node-v22.12.0-darwin-arm64.tar.gz"} +"platforms.macos-x64" = { checksum = "sha256:52bc25dd026db7247c3c00439afdb83e95087248267f02d6c1a7250d1f896173", url = "https://nodejs.org/dist/v22.12.0/node-v22.12.0-darwin-x64.tar.gz"} +"platforms.windows-x64" = { checksum = "sha256:2b8f2256382f97ad51e29ff71f702961af466c4616393f767455501e6aece9b8", url = "https://nodejs.org/dist/v22.12.0/node-v22.12.0-win-x64.zip"} + +[[tools.pnpm]] +version = "10.11.0" +backend = "aqua:pnpm/pnpm" + +[[tools.semver]] +version = "3.3.0" +backend = "vfox:mise-plugins/vfox-semver" +"platforms.linux-arm64" = { url = "https://raw.githubusercontent.com/fsaintjacques/semver-tool/3.3.0/src/semver"} +"platforms.linux-x64" = { url = "https://raw.githubusercontent.com/fsaintjacques/semver-tool/3.3.0/src/semver"} +"platforms.macos-arm64" = { url = "https://raw.githubusercontent.com/fsaintjacques/semver-tool/3.3.0/src/semver"} +"platforms.macos-x64" = { url = "https://raw.githubusercontent.com/fsaintjacques/semver-tool/3.3.0/src/semver"} +"platforms.windows-x64" = { url = "https://raw.githubusercontent.com/fsaintjacques/semver-tool/3.3.0/src/semver"} diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..d61115f --- /dev/null +++ b/mise.toml @@ -0,0 +1,5 @@ +[tools] +node = "22.12.0" +pnpm = "10.11.0" +mkcert = "1.4.4" +semver = "3.3.0"