Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add bump action #219

Merged
merged 1 commit into from
Nov 10, 2022
Merged

feat: add bump action #219

merged 1 commit into from
Nov 10, 2022

Conversation

afonsojramos
Copy link
Collaborator

Create an action that updates a Cargo.toml and Cargo.lock so that we don't need to create a branch and make then changes ourselves.

@afonsojramos afonsojramos added ✨ feature New feature or request 📦 dependency Related to dependencies labels Nov 10, 2022
@afonsojramos afonsojramos self-assigned this Nov 10, 2022
@aquelemiguel
Copy link
Owner

I'm not too familiar with GitHub Actions, how does this work? How does it know it's supposed to bump to a major/minor/patch and how does it automatically edit the Cargo.toml and Cargo.lock?

@afonsojramos
Copy link
Collaborator Author

How does it know it's supposed to bump to a major/minor/patch
This is an option that will be available in the actions page.

    inputs:
      version:
        description: 'Version to bump to (e.g. 1.4.3)'
        required: true
        type: choice
        options:
          - major
          - minor
          - patch

and how does it automatically edit the Cargo.toml and Cargo.lock?

      - name: Install cargo-bump
        run: cargo install cargo-bump

      - name: Bump Cargo version
        run: cargo-bump bump ${{ github.event.inputs.version }}

      - name: Bump Cargo.lock
        run: cargo build

I'm not too familiar with GitHub Actions, how does this work?

It does the above then creates a PR using peter-evans/create-pull-request.

@aquelemiguel
Copy link
Owner

@afonsojramos Okay, thank you for clarifying, let's see it in practice. 🙂

@afonsojramos
Copy link
Collaborator Author

PS: I do not hold responsibility for any damages caused. World may explode 💣

@afonsojramos afonsojramos merged commit fadf064 into main Nov 10, 2022
@afonsojramos afonsojramos deleted the create-bump-action branch November 10, 2022 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 dependency Related to dependencies ✨ feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants