Flesh out autocomplete (#90) #12
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: 'go.mod' | |
| cache: false | |
| - name: Clean Go environment | |
| run: | | |
| echo "Cleaning Go environment for fresh build..." | |
| go clean -cache -modcache -i -r || true | |
| echo "Go environment cleaned" | |
| - name: Download dependencies | |
| run: | | |
| echo "Downloading fresh dependencies..." | |
| go mod download | |
| go mod verify | |
| echo "Dependencies ready" | |
| - name: Build release archives with checksums | |
| run: | | |
| set -e | |
| echo "Building release binaries and archives for ${{ github.ref_name }}..." | |
| if ! make release-archives VERSION="${{ github.ref_name }}"; then | |
| echo "❌ Build or archive creation failed" | |
| exit 1 | |
| fi | |
| echo "✅ All builds and archives completed" | |
| # Create consolidated checksums file for release | |
| cat *.tar.gz.sha256 > checksums.txt | |
| echo "" | |
| echo "Checksums:" | |
| cat checksums.txt | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| *.tar.gz | |
| checksums.txt | |
| body: | | |
| ## OADP CLI ${{ github.ref_name }} | |
| Cross-platform kubectl plugin for managing OpenShift API for Data Protection (OADP) backup and restore operations. | |
| ### Installation | |
| #### Via krew (recommended) | |
| ```bash | |
| kubectl krew install oadp | |
| ``` | |
| #### Via krew manifest (for testing or custom indexes) | |
| ```bash | |
| curl -LO https://github.com/migtools/oadp-cli/releases/download/${{ github.ref_name }}/oadp.yaml | |
| kubectl krew install --manifest=oadp.yaml | |
| ``` | |
| #### Manual installation | |
| 1. Download the appropriate binary for your platform | |
| 2. Extract the archive | |
| 3. Add the binary to your PATH | |
| 4. Verify installation: `kubectl oadp --help` | |
| ### Supported Platforms | |
| - Linux (amd64, arm64, ppc64le, s390x) | |
| - macOS (amd64, arm64) | |
| - Windows (amd64, arm64) | |
| ### Files Included | |
| - **Binary archives**: Platform-specific kubectl-oadp binaries with LICENSE | |
| - **checksums.txt**: SHA256 checksums for all binaries | |
| ### For Krew Index Maintainers | |
| - On creating new releases, krew-release-bot will automatically open a PR to the krew index with the new release | |
| - Must be non-prerelease semver tag | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Skip this step if it is not a clean semver: eg if it has -beta, or any other suffix, do not run | |
| - name: Update new version in krew-index | |
| if: ${{!contains(github.ref_name, '-') && !contains(github.ref_name, '+')}} | |
| uses: rajatjindal/krew-release-bot@v0.0.46 |