Skip to content

Commit

Permalink
add workflow to automatically bump the version
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Crenshaw <[email protected]>
  • Loading branch information
crenshaw-dev committed Jan 3, 2025
1 parent b0451b9 commit f8db098
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/bump-major-version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Bump major version
on:
workflow_dispatch: {}

permissions: {}

jobs:
prepare-release:
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
name: Automatically update major version
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Run script to bump the version
run: |
hack/bump-major-version.sh
- name: Create pull request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
commit-message: "Bump major version"
title: "Bump major version"
body: Bumping major version
branch: bump-major-version
branch-suffix: random
signoff: true
3 changes: 0 additions & 3 deletions hack/bump-major-version.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/usr/bin/env bash

# This script bumps the major version of Argo CD. Before cutting a new major release, run this script and open a PR.
# If you have to make _any_ manual changes to the PR, this script should be updated to automate those.

# This script is intended to be run from the root of the repository.

# Get the current version from go.mod.
CURRENT_VERSION=$(grep 'module github.com/argoproj/argo-cd' go.mod | awk '{print $2}' | sed 's/.*\/v//')
Expand Down

0 comments on commit f8db098

Please sign in to comment.