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

Added workflow to release csm libs #87

Merged
merged 5 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
# Don Khan (donatwork)
# Sean Gallacher (gallacher)
# Alexander Hoppe (hoppea2)
# Harish Prabhakara (harishp8889)
# Matt Schmaelzle (mjsdell)
# Prasanna Muthukumaraswamy (prablr79)
# Sharmila Ramamoorthy (sharmilarama)
# Shayna Finocchiaro (shaynafinocchiaro)


# for all files:
* @AronAtDell @ChristianAtDell @donatwork @gallacher @hoppea2 @mjsdell @prablr79 @sharmilarama @shaynafinocchiaro
* @AronAtDell @ChristianAtDell @donatwork @gallacher @hoppea2 @harishp8889 @mjsdell @prablr79 @sharmilarama @shaynafinocchiaro
68 changes: 68 additions & 0 deletions .github/workflows/csm-release-libs.yaml
Original file line number Diff line number Diff line change
@@ -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:
harishp8889 marked this conversation as resolved.
Show resolved Hide resolved
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 '[email protected]'
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 '[email protected]'
git checkout -b release/v${{ github.event.inputs.version }}
git push origin release/v${{ github.event.inputs.version }}
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down