From 2b83b511a30c25945e480f59b5c5b621023974f0 Mon Sep 17 00:00:00 2001 From: Max Kalashnikoff Date: Tue, 26 Sep 2023 21:37:31 +0300 Subject: [PATCH] chore: bumping version in `Cargo.lock` in release CI workflow (#200) --- .github/workflows/release.yml | 50 ++--------------------------------- 1 file changed, 2 insertions(+), 48 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 48c794ed..31850c57 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,57 +28,11 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: "Cocogitto release" - id: release - uses: cocogitto/cocogitto-action@v3 + - name: Update and commit the release version + uses: WalletConnect/actions/github/update-rust-version/@2.1.4 with: - check: true - check-latest-tag-only: true - release: true - git-user: 'github-actions[bot]' - git-user-email: "github-actions[bot]@users.noreply.github.com" - - - name: "Update version in Cargo.toml" - shell: bash - run: | - version=$(echo "${{ steps.release.outputs.version }}" | sed 's/v//g') - - sed "s/^version = \".*\"\$/version = \"$version\"/" ./Cargo.toml > /tmp/cargo.toml - mv /tmp/cargo.toml ./Cargo.toml - - - name: "Commit version bump" - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: "chore: Bump version for release" - file_pattern: "Cargo.toml Cargo.lock" - commit_user_name: "github-actions[bot]" - commit_user_email: "github-actions[bot]@users.noreply.github.com" - - - name: "Install Rust toolchain (stable)" - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - default: true - - - name: Cache cargo registry - uses: Swatinem/rust-cache@v2 - - - name: "Generate Changelog" - run: cog changelog --at ${{ steps.release.outputs.version }} -t full_hash > GITHUB_CHANGELOG.md - - - name: "Update Github release notes" - uses: softprops/action-gh-release@v1 - with: - body_path: GITHUB_CHANGELOG.md - tag_name: ${{ steps.release.outputs.version }} token: ${{ secrets.RELEASE_PAT }} - - id: clean_version - run: | - version=$(echo "${{ steps.release.outputs.version }}" | sed 's/v//g') - echo "version=$version" >> $GITHUB_OUTPUT - build-container: runs-on: group: ubuntu-runners