Showing the changes to .github (3 of 3 files). Show all
Unified · Split
| @@ -0,0 +1,49 @@ | |||
| 1 | name: Setup Jujutsu | ||
| 2 | description: Install the jj CLI from the official jj-vcs release artifacts. | ||
| 3 | |||
| 4 | inputs: | ||
| 5 | version: | ||
| 6 | description: Jujutsu release tag to install. | ||
| 7 | required: false | ||
| 8 | default: v0.40.0 | ||
| 9 | |||
| 10 | runs: | ||
| 11 | using: composite | ||
| 12 | steps: | ||
| 13 | - name: Install jj | ||
| 14 | shell: bash | ||
| 15 | env: | ||
| 16 | JJ_VERSION: ${{ inputs.version }} | ||
| 17 | run: | | ||
| 18 | set -euo pipefail | ||
| 19 | |||
| 20 | case "${RUNNER_OS}-${RUNNER_ARCH}" in | ||
| 21 | Linux-X64) | ||
| 22 | asset="jj-${JJ_VERSION}-x86_64-unknown-linux-musl.tar.gz" | ||
| 23 | ;; | ||
| 24 | Linux-ARM64) | ||
| 25 | asset="jj-${JJ_VERSION}-aarch64-unknown-linux-musl.tar.gz" | ||
| 26 | ;; | ||
| 27 | macOS-X64) | ||
| 28 | asset="jj-${JJ_VERSION}-x86_64-apple-darwin.tar.gz" | ||
| 29 | ;; | ||
| 30 | macOS-ARM64) | ||
| 31 | asset="jj-${JJ_VERSION}-aarch64-apple-darwin.tar.gz" | ||
| 32 | ;; | ||
| 33 | *) | ||
| 34 | echo "Unsupported runner for jj install: ${RUNNER_OS}-${RUNNER_ARCH}" >&2 | ||
| 35 | exit 1 | ||
| 36 | ;; | ||
| 37 | esac | ||
| 38 | |||
| 39 | install_dir="${RUNNER_TEMP}/jj-${JJ_VERSION}" | ||
| 40 | mkdir -p "$install_dir" | ||
| 41 | |||
| 42 | curl -fsSL \ | ||
| 43 | "https://github.com/jj-vcs/jj/releases/download/${JJ_VERSION}/${asset}" \ | ||
| 44 | -o "${RUNNER_TEMP}/${asset}" | ||
| 45 | tar -xzf "${RUNNER_TEMP}/${asset}" -C "$install_dir" | ||
| 46 | |||
| 47 | chmod +x "${install_dir}/jj" | ||
| 48 | echo "$install_dir" >> "$GITHUB_PATH" | ||
| 49 | "${install_dir}/jj" --version | ||
| @@ -25,6 +25,9 @@ jobs: · 24 unmodified lines | |||
| 25 | with: | 25 | with: |
| 26 | node-version-file: package.json | 26 | node-version-file: package.json |
| 27 | 27 | ||
| 28 | - name: Setup Jujutsu | ||
| 29 | uses: ./.github/actions/setup-jj | ||
| 30 | |||
| 28 | - name: Cache Bun and Turbo | 31 | - name: Cache Bun and Turbo |
| 29 | uses: actions/cache@v5 | 32 | uses: actions/cache@v5 |
| 30 | with: | 33 | with: |
| @@ -95,6 +95,9 @@ jobs: · 94 unmodified lines | |||
| 95 | with: | 95 | with: |
| 96 | node-version-file: package.json | 96 | node-version-file: package.json |
| 97 | 97 | ||
| 98 | - name: Setup Jujutsu | ||
| 99 | uses: ./.github/actions/setup-jj | ||
| 100 | |||
| 98 | - name: Install dependencies | 101 | - name: Install dependencies |
| 99 | run: bun install --frozen-lockfile | 102 | run: bun install --frozen-lockfile |
| 100 | 103 | ||