name: release on: create: tags: - v* push: branches: - main concurrency: group: release-${{ github.ref }} cancel-in-progress: true permissions: read-all jobs: release: if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'helm/helm' runs-on: ubuntu-latest-16-cores timeout-minutes: 30 steps: - name: Checkout source code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd with: fetch-depth: 0 - name: Add variables to environment file run: cat ".github/env" >> "$GITHUB_ENV" - name: Setup Go uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 with: go-version: '${{ env.GOLANG_VERSION }}' check-latest: true - name: Run unit tests run: make test-coverage - name: Build Helm Binaries run: | set -euo pipefail make build-cross VERSION="${{ github.ref_name }}" make dist checksum VERSION="${{ github.ref_name }}" - name: Set latest version run: | set -euo pipefail mkdir -p _dist_versions LATEST_VERSION="$(git tag | sort -r --version-sort | grep '^v[0-9]' | grep -v '-' | head -n1)" echo "LATEST_VERSION=${LATEST_VERSION}" if [[ "${LATEST_VERSION}" != v4.* ]]; then echo "Error: Latest version ${LATEST_VERSION} is not a v4 release" exit 1 fi echo "${LATEST_VERSION}" > _dist_versions/helm-latest-version echo "${LATEST_VERSION}" > _dist_versions/helm4-latest-version - name: Upload Binaries uses: bacongobbler/azure-blob-storage-upload@50f7d898b7697e864130ea04c303ca38b5751c50 env: AZURE_STORAGE_CONNECTION_STRING: "${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}" AZURE_STORAGE_CONTAINER_NAME: "${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}" with: source_dir: _dist container_name: ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }} connection_string: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} extra_args: '--pattern helm-*' - name: Upload Version tag files uses: bacongobbler/azure-blob-storage-upload@50f7d898b7697e864130ea04c303ca38b5751c50 env: AZURE_STORAGE_CONNECTION_STRING: "${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}" AZURE_STORAGE_CONTAINER_NAME: "${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}" with: overwrite: 'true' source_dir: _dist_versions container_name: ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }} connection_string: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} canary-release: runs-on: ubuntu-latest-16-cores timeout-minutes: 30 if: github.ref == 'refs/heads/main' && github.repository == 'helm/helm' steps: - name: Checkout source code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - name: Add variables to environment file run: cat ".github/env" >> "$GITHUB_ENV" - name: Setup Go uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 with: go-version: '${{ env.GOLANG_VERSION }}' check-latest: true - name: Run unit tests run: make test-coverage - name: Build Helm Binaries run: | set -euo pipefail make build-cross make dist checksum VERSION="canary" - name: Upload Binaries uses: bacongobbler/azure-blob-storage-upload@50f7d898b7697e864130ea04c303ca38b5751c50 with: source_dir: _dist container_name: ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }} connection_string: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} extra_args: '--pattern helm-*' overwrite: 'true'