From 0d719d4262906af77d85fad1ed0089ea992e4b6d Mon Sep 17 00:00:00 2001 From: Billie Thompson Date: Sat, 3 Aug 2024 22:18:02 +0200 Subject: [PATCH] ci: use binstall for faster releases --- .github/workflows/pipeline.yml | 66 +++++++++++++++++----------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 0c73f03..61921df 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -14,47 +14,47 @@ jobs: uses: PurpleBooth/common-pipelines/.github/workflows/rust-check.yml@main specdown: uses: PurpleBooth/common-pipelines/.github/workflows/specdown-check.yml@main - - release: if: github.ref == 'refs/heads/main' needs: - - commit-checks - - specdown - - lint-markdown - - rust-checks + - specdown + - lint-markdown + - rust-checks + - commit-checks outputs: current_version: ${{ steps.current_version.outputs.current_version }} previous_version: ${{ steps.previous_version.outputs.previous_version }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@main - with: - fetch-depth: 0 - - name: Get tags - run: git fetch --tags origin - - shell: bash - run: cargo install cargo-edit - - shell: bash - run: cargo install --locked cocogitto - - id: previous_version - run: | - cog get-version | tee .version - echo "previous_version=$( cat .version )" >> "$GITHUB_OUTPUT" - rm .version - shell: bash - - name: Semver release - id: release - run: | - git config --global user.name "cog-bot" - git config --global user.email "cog@example.com" - cog bump --auto - - id: current_version - run: | - cog get-version | tee .version - echo "current_version=$( cat .version )" >> "$GITHUB_OUTPUT" - rm .version - shell: bash + - uses: actions/checkout@main + with: + fetch-depth: 0 + - uses: cargo-bins/cargo-binstall@main + name: Install cargo binstall + - name: Get tags + run: git fetch --tags origin + - shell: bash + run: cargo binstall --no-confirm cargo-edit + - shell: bash + run: cargo binstall --no-confirm --locked cocogitto + - id: previous_version + run: | + cog get-version | tee .version + echo "previous_version=$( cat .version )" >> "$GITHUB_OUTPUT" + rm .version + shell: bash + - name: Semver release + id: release + run: | + git config --global user.name "cog-bot" + git config --global user.email "cog@example.com" + cog bump --auto + - id: current_version + run: | + cog get-version | tee .version + echo "current_version=$( cat .version )" >> "$GITHUB_OUTPUT" + rm .version + shell: bash release-binary: if: needs.release.outputs.current_version != needs.release.outputs.previous_version