From 9e3c1438c907465b107d5f5939227fcf4d88b521 Mon Sep 17 00:00:00 2001 From: Hugh Nimmo-Smith Date: Mon, 17 Mar 2025 12:07:28 +0000 Subject: [PATCH] Cleanup version vars --- .github/workflows/publish-embedded-packages.yaml | 4 ++-- .github/workflows/publish.yaml | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-embedded-packages.yaml b/.github/workflows/publish-embedded-packages.yaml index 9ad3f36c6..b5c5cffbb 100644 --- a/.github/workflows/publish-embedded-packages.yaml +++ b/.github/workflows/publish-embedded-packages.yaml @@ -23,7 +23,7 @@ jobs: build_element_call: uses: ./.github/workflows/build-element-call.yaml with: - vite_app_version: embedded-${{ github.event.release.tag_name }} + vite_app_version: embedded-${{ github.env.VERSION }} package: embedded publish_tarball: @@ -35,7 +35,7 @@ jobs: contents: write # required to upload release asset packages: write env: - FILENAME_PREFIX: element-call-embedded-${{ github.event.release.tag_name || github.sha }} # Using ${{ env.VERSION }} doesn't work here + FILENAME_PREFIX: element-call-embedded-${{ github.env.VERSION }} steps: - name: 📥 Download built element-call artifact uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 26ec1e7ba..2d8f0ef89 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -4,12 +4,15 @@ on: release: types: [published] +env: + VERSION: ${{ github.event.release.tag_name }} + jobs: build_element_call: uses: ./.github/workflows/build-element-call.yaml with: package: full - vite_app_version: ${{ github.event.release.tag_name }} + vite_app_version: ${{ github.env.VERSION }} secrets: SENTRY_ORG: ${{ secrets.SENTRY_ORG }} SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} @@ -24,7 +27,7 @@ jobs: contents: write # required to upload release asset packages: write env: - FILENAME_PREFIX: element-call-${{ github.event.release.tag_name }} + FILENAME_PREFIX: element-call-${{ github.env.VERSION }} steps: - name: 📥 Download built element-call artifact uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4 @@ -62,6 +65,8 @@ jobs: name: Add docker release note runs-on: ubuntu-latest steps: + - name: Get artifact version + run: echo "ARTIFACT_VERSION=${VERSION:1}" >> "$GITHUB_ENV" - name: Add release note uses: softprops/action-gh-release@v2 with: @@ -73,5 +78,5 @@ jobs: The image provides a full build of Element Call that can be used both in standalone and as a widget (on a remote URL). ``` - docker pull ghcr.io/element-hq/element-call:${{ github.event.release.tag_name }} + docker pull ghcr.io/element-hq/element-call:${{ env.ARTIFACT_VERSION }} ```