diff --git a/.github/workflows/license-checker.yaml b/.github/workflows/license-checker.yaml index ec134b1..02e1cc5 100644 --- a/.github/workflows/license-checker.yaml +++ b/.github/workflows/license-checker.yaml @@ -1,8 +1,6 @@ name: Weekly License Header Check on: - schedule: - - cron: '0 0 * * 1' # Runs every Monday at 00:00 UTC workflow_dispatch: jobs: license-check: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 931b92f..cf2103e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,52 +6,27 @@ on: # yamllint disable-line rule:truthy workflow_dispatch: inputs: option: - description: 'Select version to release' + description: "Select type of release. If first release, use major and it will release v1.0.0." required: true type: choice - default: 'minor' + default: "minor" options: - major - minor - patch - - n-1/n-2 patch (Provide input in the below box) + - version version: - description: "Patch version to release. example: 2.1.x (Use this only if n-1/n-2 patch is selected)" + description: "Specific semver version to release. Only used when 'version' is the selected option. Example: v2.1.x." required: false type: string repository_dispatch: types: [release-go-libs] + jobs: - process-inputs: - name: Process Inputs - runs-on: ubuntu-latest - outputs: - processedVersion: ${{ steps.set-version.outputs.versionEnv }} - steps: - - name: Process input - id: set-version - shell: bash - run: | - if [[ "${{ github.event_name }}" == "repository_dispatch" ]]; then - echo "versionEnv=minor" >> $GITHUB_OUTPUT - exit 0 - fi - if [[ "${{ github.event.inputs.version }}" != "" && "${{ github.event.inputs.option }}" == "n-1/n-2 patch (Provide input in the below box)" ]]; then - # if both version and option are provided, then version takes precedence i.e. patch release for n-1/n-2 - echo "versionEnv=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT - exit 0 - fi - if [[ "${{ github.event.inputs.option }}" != "n-1/n-2 patch (Provide input in the below box)" ]]; then - # if only option is provided, then option takes precedence i.e. minor, major or patch release - echo "versionEnv=${{ github.event.inputs.option }}" >> $GITHUB_OUTPUT - exit 0 - fi - # if neither option nor version is provided, then minor release is taken by default (Auto-release) - echo "versionEnv=minor" >> $GITHUB_OUTPUT csm-release: - needs: [process-inputs] - uses: dell/common-github-actions/.github/workflows/csm-release-libs.yaml@main name: Release Go Client Libraries + uses: dell/common-github-actions/.github/workflows/csm-release-libs.yaml@main with: - version: ${{ needs.process-inputs.outputs.processedVersion }} + option: ${{ inputs.option || 'minor' }} + version: ${{ inputs.version || '' }} secrets: inherit