aquelemiguel / parrot

🦜 A hassle-free, highly performant, self-hosted Discord music bot with YouTube and Spotify support. Powered by yt-dlp.
MIT License
136 stars 44 forks source link

feat: add bump action #219

Closed afonsojramos closed 1 year ago

afonsojramos commented 1 year ago

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.

aquelemiguel commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

afonsojramos commented 1 year ago

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