diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml new file mode 100644 index 000000000..f7f7818d6 --- /dev/null +++ b/.github/workflows/release-plz.yml @@ -0,0 +1,44 @@ +name: release-plz + +permissions: + pull-requests: write + contents: write + +on: + push: + branches: + - main + - release-plz + +concurrency: + group: release-plz + +jobs: + release-plz: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} + - uses: Swatinem/rust-cache@v2 + with: + shared-key: unit + #save-if: false TODO: add this back later + cache-on-failure: true + - run: mkdir -p "$HOME/bin" && echo "$HOME/bin" >> "$GITHUB_PATH" + - run: | + set -euxo pipefail + cargo build --all-features + cp target/debug/mise "$HOME"/bin + mise trust --all + mise settings set experimental true + - uses: actions/cache/restore@v4 + with: + key: v0-mise-tools-${{ hashFiles('.mise.toml') }} + restore-keys: v0-mise-tools + - run: mise install + - run: mise run release-plz + env: + GITHUB_TOKEN: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 340ba57ac..cd01ed753 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,7 +36,6 @@ jobs: tool: nextest,just,cargo-deny,cargo-msrv,cargo-machete,usage-cli - name: Install direnv run: sudo apt-get update; sudo apt-get install direnv - - run: cargo binstall usage-cli - run: cargo nextest run --all-features env: RUST_BACKTRACE: "1" @@ -46,6 +45,13 @@ jobs: - run: ./scripts/test-standalone.sh - run: cargo build --all-features - run: ./target/debug/mise settings set experimental true + - uses: actions/cache@v4 + with: + path: | + ~/.local/share/mise/installs + ~/.local/share/mise/plugins + key: v0-mise-tools-${{ hashFiles('.mise.toml') }} + restore-keys: v0-mise-tools - run: ./target/debug/mise install - run: ./target/debug/mise run render - run: ./target/debug/mise run lint-fix diff --git a/.idea/prettier.xml b/.idea/prettier.xml index f6ac06c75..3464f8d13 100644 --- a/.idea/prettier.xml +++ b/.idea/prettier.xml @@ -1,7 +1,9 @@ + \ No newline at end of file diff --git a/.mise/tasks/release-plz b/.mise/tasks/release-plz new file mode 100755 index 000000000..ad6e6d7e5 --- /dev/null +++ b/.mise/tasks/release-plz @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +set -euxo pipefail + +version="$(git cliff --bumped-version)" +changelog="$(git cliff --unreleased)" + +sed -i.bak "s/^mise [0-9]\+\.[0-9]\+\.[0-9]\+\(-rc\.[0-9]\+\)\?$/mise ${version#v}/" README.md +sed -i.bak "s/^Version: [0-9]\+\.[0-9]\+\.[0-9]\+\(-rc\.[0-9]\+\)\?$/Version: ${version#v}/" packaging/rpm/mise.spec +sed -i.bak "s/version = \"[0-9]\+\.[0-9]\+\.[0-9]\+\(-rc\.[0-9]\+\)\?\";$/version = \"${version#v}\";/" default.nix + +mise run update-shorthand-repo +mise run render ::: lint-fix + +git config user.name mise-en-dev +git config user.email 123107610+mise-en-dev@users.noreply.github.com +git cliff --bump -o CHANGELOG.md --verbose +git add \ + CHANGELOG.md \ + README.md \ + default.nix \ + packaging/rpm/mise.spec \ + src/default_shorthands.rs \ + mise.usage.kdl \ + completions \ + man/ +git clean -df +git checkout -B release +git commit -m "Release $version" +git push origin release --force +gh pr create --title "Release $version" --body "$changelog" --label "release" || + gh pr edit --title "Release $version" --body "$changelog" diff --git a/scripts/update-shorthand-repo.sh b/.mise/tasks/update-shorthand-repo similarity index 97% rename from scripts/update-shorthand-repo.sh rename to .mise/tasks/update-shorthand-repo index cbd19a796..e5145221c 100755 --- a/scripts/update-shorthand-repo.sh +++ b/.mise/tasks/update-shorthand-repo @@ -17,7 +17,7 @@ cat >src/default_shorthands.rs <> = ("qdns", "https://github.com/moritz-makandra/asdf-plugin-qdns.git"), ("quarkus", "https://github.com/asdf-community/asdf-quarkus.git"), ("r", "https://github.com/asdf-community/asdf-r.git"), - ("rabbitmq", "https://github.com/mise-plugins/asdf-rabbitmq.git"), + ("rabbitmq", "https://github.com/w-sanches/asdf-rabbitmq.git"), ("racket", "https://github.com/asdf-community/asdf-racket.git"), ("raku", "https://github.com/m-dango/asdf-raku.git"), ("rancher", "https://github.com/abinet/asdf-rancher.git"),