diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c8cec64c..cf0f15e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,19 +24,47 @@ jobs: tag: ${{ inputs.tag }} platforms: ${{ inputs.all_platforms && 'linux/amd64,linux/arm64' || 'linux/amd64' }} - create-github-release: + create-docker-info: runs-on: ubuntu-latest needs: prod-container-build steps: - - name: Create GitHub Release + - name: Create Docker Image Info File + run: echo "Docker image - ghcr.io/${{ github.repository_owner }}/cosi:${{ inputs.tag }}" > docker-image-info.txt + + - name: Upload Docker Info as Artifact + uses: actions/upload-artifact@v4 + with: + name: docker-image-info + path: docker-image-info.txt + + create-github-release: + runs-on: ubuntu-latest + needs: [create-docker-info, package-helm-chart] + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Download Helm Chart Artifact + uses: actions/download-artifact@v4 + with: + name: helm-chart + + - name: Download Docker Info Artifact + uses: actions/download-artifact@v4 + with: + name: docker-image-info + + - name: Upload Assets and Create GitHub Release uses: softprops/action-gh-release@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - target_commitish: ${{ github.sha }} + files: | + docker-image-info.txt + scality-cosi-driver-${{ inputs.tag }}.tgz tag_name: ${{ inputs.tag }} name: Release ${{ inputs.tag }} - generate_release_notes: true + body: "Release for tag ${{ inputs.tag }}" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} package-helm-chart: runs-on: ubuntu-latest @@ -62,6 +90,18 @@ jobs: name: helm-chart path: scality-cosi-driver-${{ inputs.tag }}.tgz + - name: Upload Assets and Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + files: | + docker-image-info.txt + scality-cosi-driver-${{ inputs.tag }}.tgz + tag_name: ${{ inputs.tag }} + name: Release ${{ inputs.tag }} + body: "Release for tag ${{ inputs.tag }}" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Push helm chart to ghcr.io run: helm push scality-cosi-driver-${{ inputs.tag }}.tgz oci://ghcr.io/${{ github.repository }}/helm-charts