From 48d919cef65a8fc3eb3b6a3e4a4ccb5231f04d35 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Wed, 3 Jan 2024 16:41:45 +0000 Subject: [PATCH 1/3] Add Helm chart as an artifact to releases Fixes #17. --- .github/workflows/release.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3c33886..c9da5b4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -37,6 +37,10 @@ jobs: with: go-version: "~1.20" + - name: Get Version + run: echo "::set-output name=version::$(./scripts/version.sh)" + id: version + - name: Build run: ./scripts/build.sh @@ -78,3 +82,20 @@ jobs: helm repo index build/helm --url https://helm.coder.com/logstream-kube --merge build/helm/index.yaml gsutil -h "Cache-Control:no-cache,max-age=0" cp build/helm/${version}.tgz gs://helm.coder.com/logstream-kube gsutil -h "Cache-Control:no-cache,max-age=0" cp build/helm/index.yaml gs://helm.coder.com/logstream-kube + + - name: Create Release + uses: actions/create-release@v1 + id: create_release + with: + release_name: ${{ steps.version.outputs.version }} + tag_name: ${{ github.ref }} + + - name: Upload Helm Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: build/${{ steps.version.outputs.version }}.tgz + asset_name: helm.tar.gz + asset_content_type: application/gzip From 09ded63c0272fd7715c87812ed43806e302a7db9 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Wed, 3 Jan 2024 16:45:21 +0000 Subject: [PATCH 2/3] Test the workflow --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c9da5b4..f221b4b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,8 +1,8 @@ name: release on: push: - tags: - - "v*" + # tags: + # - "v*" permissions: # Required to publish a release From f92c3a85b09bc7f63ae60ad8b4f51352b89ae904 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Wed, 3 Jan 2024 16:47:40 +0000 Subject: [PATCH 3/3] Fix tag pushes --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f221b4b..26d21ab 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,8 +1,8 @@ name: release on: push: - # tags: - # - "v*" + tags: + - "v*" permissions: # Required to publish a release @@ -38,7 +38,7 @@ jobs: go-version: "~1.20" - name: Get Version - run: echo "::set-output name=version::$(./scripts/version.sh)" + run: echo "version=$(./scripts/version.sh)" >> $GITHUB_OUTPUT id: version - name: Build