feat(vfox): pass tool options to EnvKeys hook #8316
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: release | |
| on: | |
| push: | |
| tags: ["v*"] | |
| pull_request: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| concurrency: | |
| group: release-${{ github.ref_name }} | |
| env: | |
| CARGO_TERM_COLOR: always | |
| DRY_RUN: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) && '0' || '1' }} | |
| RUST_BACKTRACE: 1 | |
| GITHUB_API_TOKEN: ${{ secrets.MISE_GH_TOKEN || secrets.GITHUB_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.MISE_GH_TOKEN || secrets.GITHUB_TOKEN }} | |
| GH_TOKEN: ${{ secrets.MISE_GH_TOKEN || secrets.GITHUB_TOKEN }} | |
| jobs: | |
| build-tarball-linux: | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| name: build-tarball-${{matrix.name}} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| env: | |
| MINIO_AWS_ACCESS_KEY_ID: ${{ secrets.MINIO_AWS_ACCESS_KEY_ID }} | |
| MINIO_AWS_SECRET_ACCESS_KEY: ${{ secrets.MINIO_AWS_SECRET_ACCESS_KEY }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: linux-x64 | |
| target: x86_64-unknown-linux-gnu | |
| - name: linux-x64-musl | |
| target: x86_64-unknown-linux-musl | |
| - name: linux-arm64 | |
| target: aarch64-unknown-linux-gnu | |
| - name: linux-arm64-musl | |
| target: aarch64-unknown-linux-musl | |
| - name: linux-armv7 | |
| target: armv7-unknown-linux-gnueabi | |
| - name: linux-armv7-musl | |
| target: armv7-unknown-linux-musleabi | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Install cross | |
| uses: taiki-e/install-action@0aa4f22591557b744fe31e55dbfcdfea74a073f7 # v2 | |
| with: | |
| tool: cross | |
| - name: cache crates | |
| id: cache-crates | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: ~/.cargo/registry/cache | |
| key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: cargo-registry | |
| - name: build-tarball ${{matrix.target}} | |
| uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 | |
| with: | |
| timeout_minutes: 45 | |
| max_attempts: 3 | |
| command: scripts/build-tarball.sh ${{matrix.target}} | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: tarball-${{matrix.target}} | |
| path: | | |
| dist/mise-*.tar.xz | |
| dist/mise-*.tar.gz | |
| dist/mise-*.tar.zst | |
| if-no-files-found: error | |
| - uses: taiki-e/install-action@0aa4f22591557b744fe31e55dbfcdfea74a073f7 # v2 | |
| with: { tool: cargo-cache } | |
| - if: steps.cache-crates.outputs.cache-hit != 'true' | |
| run: cargo cache --autoclean | |
| build-tarball-macos: | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| name: build-tarball-${{matrix.name}} | |
| runs-on: macos-latest | |
| timeout-minutes: 45 | |
| env: | |
| MINIO_AWS_ACCESS_KEY_ID: ${{ secrets.MINIO_AWS_ACCESS_KEY_ID }} | |
| MINIO_AWS_SECRET_ACCESS_KEY: ${{ secrets.MINIO_AWS_SECRET_ACCESS_KEY }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: macos-x64 | |
| target: x86_64-apple-darwin | |
| - name: macos-arm64 | |
| target: aarch64-apple-darwin | |
| steps: | |
| - uses: apple-actions/import-codesign-certs@95e84a1a18f2bdbc5c6ab9b7f4429372e4b13a8b # v5 | |
| with: | |
| p12-file-base64: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTS_P12 }} | |
| p12-password: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTS_P12_PASS }} | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: cache crates | |
| id: cache-crates | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: ~/.cargo/registry/cache | |
| key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: cargo-registry | |
| - name: Setup Rust target | |
| run: rustup target add ${{matrix.target}} | |
| - name: build-tarball ${{matrix.target}} | |
| uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 | |
| with: | |
| timeout_minutes: 45 | |
| max_attempts: 3 | |
| command: scripts/build-tarball.sh ${{matrix.target}} | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: tarball-${{matrix.target}} | |
| path: | | |
| dist/mise-*.tar.xz | |
| dist/mise-*.tar.gz | |
| dist/mise-*.tar.zst | |
| if-no-files-found: error | |
| - uses: taiki-e/install-action@0aa4f22591557b744fe31e55dbfcdfea74a073f7 # v2 | |
| with: { tool: cargo-cache } | |
| - if: steps.cache-crates.outputs.cache-hit != 'true' | |
| run: cargo cache --autoclean | |
| build-tarball-windows: | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| name: build-tarball-windows-${{matrix.arch}} | |
| runs-on: windows-latest | |
| timeout-minutes: 45 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: arm64 | |
| target: aarch64-pc-windows-msvc | |
| - arch: x64 | |
| target: x86_64-pc-windows-msvc | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - run: rustup target add ${{matrix.target}} | |
| - uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2 | |
| with: | |
| key: ${{matrix.arch}} | |
| - run: scripts/build-tarball.ps1 ${{matrix.target}} | |
| env: | |
| OS: windows | |
| ARCH: ${{matrix.arch}} | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: tarball-${{matrix.target}} | |
| path: dist/*.zip | |
| if-no-files-found: error | |
| e2e-linux: | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| name: e2e-linux-${{matrix.tranche}} | |
| needs: [build-tarball-linux] | |
| runs-on: ubuntu-latest | |
| #container: ghcr.io/jdx/mise:github-actions | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| tranche: [0, 1, 2, 3, 4, 5, 6, 7] | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Install zsh/fish/direnv/fd | |
| run: sudo apt-get update; sudo apt-get install zsh fish direnv fd-find liblzma-dev libbz2-dev | |
| - name: Install fd-find | |
| run: | | |
| mkdir -p "$HOME/.local/bin" | |
| ln -s "$(which fdfind)" "$HOME/.local/bin/fd" | |
| echo "$HOME/.local/bin" >> "$GITHUB_PATH" | |
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| name: tarball-x86_64-unknown-linux-gnu | |
| path: dist | |
| - uses: taiki-e/install-action@0aa4f22591557b744fe31e55dbfcdfea74a073f7 # v2 | |
| with: | |
| tool: usage-cli | |
| - run: tar -C "$HOME" -xvf "dist/mise-$(./scripts/get-version.sh)-linux-x64.tar.zst" | |
| - run: echo "$HOME/mise/bin" >> "$GITHUB_PATH" | |
| - run: mise -v | |
| - run: mise x wait-for-gh-rate-limit -- wait-for-gh-rate-limit | |
| - run: mise i | |
| - name: Run e2e tests | |
| uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3 | |
| env: | |
| TEST_TRANCHE: ${{matrix.tranche}} | |
| TEST_TRANCHE_COUNT: 8 | |
| TEST_ALL: 1 | |
| with: | |
| timeout_minutes: 20 | |
| max_attempts: 3 | |
| command: ./e2e/run_all_tests | |
| rpm: | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| runs-on: ubuntu-latest | |
| needs: [build-tarball-linux] | |
| timeout-minutes: 10 | |
| container: ghcr.io/jdx/mise:rpm@sha256:bdc5d0debfaea79fdcd481fd4b077be4ee735e054b07410a1120dab5b95175ec | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6 | |
| with: | |
| gpg_private_key: ${{ secrets.MISE_GPG_KEY }} | |
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| name: tarball-x86_64-unknown-linux-gnu | |
| path: dist | |
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| name: tarball-aarch64-unknown-linux-gnu | |
| path: dist | |
| - run: scripts/build-rpm.sh | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: rpm | |
| path: dist/rpmrepo | |
| if-no-files-found: error | |
| deb: | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| runs-on: ubuntu-latest | |
| needs: [build-tarball-linux] | |
| container: ghcr.io/jdx/mise:deb@sha256:f73d7ef7de21696bcb73b0e6e326e36eddf69c143df8afea9b682ee1f26ffccc | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6 | |
| with: | |
| gpg_private_key: ${{ secrets.MISE_GPG_KEY }} | |
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| name: tarball-x86_64-unknown-linux-gnu | |
| path: dist | |
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| name: tarball-aarch64-unknown-linux-gnu | |
| path: dist | |
| - run: scripts/build-deb.sh | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: deb | |
| path: dist/deb | |
| if-no-files-found: error | |
| release: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: write | |
| needs: | |
| - rpm | |
| - deb | |
| - e2e-linux | |
| - build-tarball-linux | |
| - build-tarball-macos | |
| - build-tarball-windows | |
| if: ${{ !cancelled() && !failure() }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Skip release for non-release branch PRs | |
| if: github.event_name == 'pull_request' && github.head_ref != 'release' | |
| run: | | |
| echo "Skipping release steps for PR from non-release branch" | |
| echo "All release operations will be skipped" | |
| - uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6 | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| with: | |
| gpg_private_key: ${{ secrets.MISE_GPG_KEY }} | |
| git_user_signingkey: true | |
| git_commit_gpgsign: true | |
| - name: cache zipsign | |
| id: cache-zipsign | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: ~/.cargo/bin/zipsign | |
| key: cargo-zipsign | |
| - run: ./scripts/setup-zipsign.sh | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| env: | |
| ZIPSIGN: ${{ secrets.ZIPSIGN }} | |
| - name: Install fd-find | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install fd-find minisign | |
| mkdir -p "$HOME/.local/bin" | |
| ln -s "$(which fdfind)" "$HOME/.local/bin/fd" | |
| echo "$HOME/.local/bin" >> "$GITHUB_PATH" | |
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| with: { path: artifacts } | |
| - run: ls -R artifacts | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| with: | |
| path: artifacts | |
| pattern: | | |
| mise-v*.tar.gz | |
| mise-v*.tar.xz | |
| mise-v*.tar.zst | |
| mise-v*.zip | |
| merge-multiple: true | |
| - run: echo "${{ secrets.MINISIGN_KEY }}" >minisign.key | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| - run: ls -R artifacts | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| with: | |
| name: tarball-x86_64-unknown-linux-gnu | |
| path: dist | |
| - run: tar -C "$HOME" -xvf "dist/mise-$(./scripts/get-version.sh)-linux-x64.tar.zst" | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| - run: echo "$HOME/mise/bin" >> "$GITHUB_PATH" | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| - run: which mise && mise -v && mise i | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| - run: mise x -- scripts/release.sh | |
| if: github.event_name != 'pull_request' || github.head_ref == 'release' | |
| - name: Create Draft GitHub Release | |
| if: startsWith(github.event.ref, 'refs/tags/v') | |
| run: | | |
| VERSION="$(./scripts/get-version.sh)" | |
| mise x -- git-cliff --strip all --latest >/tmp/release-notes.txt | |
| gh release create "$VERSION" \ | |
| --title "$VERSION" \ | |
| --notes-file /tmp/release-notes.txt \ | |
| --verify-tag \ | |
| --draft \ | |
| "releases/$VERSION"/* | |
| env: | |
| GH_TOKEN: ${{ secrets.MISE_GH_TOKEN }} | |
| - name: Publish Release Assets to CDN | |
| if: startsWith(github.event.ref, 'refs/tags/v') | |
| run: mise x -- scripts/publish-release.sh | |
| env: | |
| CLOUDFLARE_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} | |
| CLOUDFLARE_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }} | |
| - name: Publish GitHub Release | |
| if: startsWith(github.event.ref, 'refs/tags/v') | |
| run: | | |
| VERSION="$(./scripts/get-version.sh)" | |
| gh release edit "$VERSION" --draft=false | |
| env: | |
| GH_TOKEN: ${{ secrets.MISE_GH_TOKEN }} |