diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 49e56635..65f4989c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -12,6 +12,7 @@ # Don Khan (donatwork) # Sean Gallacher (gallacher) # Alexander Hoppe (hoppea2) +# Harish Prabhakara (harishp8889) # Matt Schmaelzle (mjsdell) # Prasanna Muthukumaraswamy (prablr79) # Sharmila Ramamoorthy (sharmilarama) @@ -19,4 +20,4 @@ # for all files: -* @AronAtDell @ChristianAtDell @donatwork @gallacher @hoppea2 @mjsdell @prablr79 @sharmilarama @shaynafinocchiaro +* @AronAtDell @ChristianAtDell @donatwork @gallacher @hoppea2 @harishp8889 @mjsdell @prablr79 @sharmilarama @shaynafinocchiaro diff --git a/.github/workflows/csm-release-libs.yaml b/.github/workflows/csm-release-libs.yaml new file mode 100644 index 00000000..6fbbbd82 --- /dev/null +++ b/.github/workflows/csm-release-libs.yaml @@ -0,0 +1,68 @@ +# Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 + +# This workflow is used to release libraries like gobrick, gofsutil etc. +name: Release Go Client Libraries + +# Invocable as a reusable workflow +on: + workflow_call: + workflow_dispatch: + inputs: + version: + description: 'Version to release (major, minor, patch)' + required: true + default: 'none' + +jobs: + build-and-scan: + name: Build, Scan and Release + runs-on: ubuntu-latest + steps: + - name: Checkout the code + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.23' + - name: Install dependencies + run: go mod tidy + - name: Build + run: go build -v ./... + - name: Run malware scan + uses: dell/common-github-actions/malware-scanner@main + with: + directories: . + options: -ri + + - name: Create new tag + run: | + git config --global user.name 'github-actions' + git config --global user.email 'github-actions@github.com' + git tag ${{ github.event.inputs.version }} + git push origin ${{ github.event.inputs.version }} + + - name: Create GitHub release + uses: comnoco/create-release-action@main + with: + tag_name: ${{ github.event.inputs.version }} + release_name: Release ${{ github.event.inputs.version }} + draft: false + prerelease: false + body: | + ## Changes + - Describe your changes here + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create release branch + run: | + git config --global user.name 'github-actions' + git config --global user.email 'github-actions@github.com' + git checkout -b release/v${{ github.event.inputs.version }} + git push origin release/v${{ github.event.inputs.version }} diff --git a/README.md b/README.md index e0b35105..a590e33a 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,30 @@ jobs: name: Golang Validation ``` +### csm-release-libs + +This workflow automates the release process for all the Go Client Libraries: + +The workflow accepts version as an input and releases that particular version. Below is the example usage in gobrick repository. If no version is specified then it will automatically bump up the major version. + +```yaml +name: Release Gobrick +# Invocable as a reusable workflow +# Can be manually triggered +on: + workflow_call: + workflow_dispatch: + inputs: + version: + description: 'Version to release (major, minor, patch)' + required: true + default: 'none' +jobs: + csm-release: + uses: dell/common-github-actions/.github/workflows/csm-release-libs.yaml@main + name: Release Go Client Libraries +``` + ## Support Don’t hesitate to ask! Contact the team and community on [our support](./docs/SUPPORT.md).