mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +00:00
Dedupe usage of VERSION
This commit is contained in:
16
.github/workflows/publish-embedded-packages.yaml
vendored
16
.github/workflows/publish-embedded-packages.yaml
vendored
@@ -16,6 +16,8 @@ env:
|
|||||||
# This is to help make sure that we notice if the packaging process has become
|
# This is to help make sure that we notice if the packaging process has become
|
||||||
# broken ahead of a release.
|
# broken ahead of a release.
|
||||||
DRY_RUN: ${{ github.event_name != 'release' }}
|
DRY_RUN: ${{ github.event_name != 'release' }}
|
||||||
|
# We should only use the SHA case for a dry run
|
||||||
|
VERSION: ${{ github.event_name == 'release' && github.event.release.tag_name || github.sha }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_element_call:
|
build_element_call:
|
||||||
@@ -33,7 +35,7 @@ jobs:
|
|||||||
contents: write # required to upload release asset
|
contents: write # required to upload release asset
|
||||||
packages: write
|
packages: write
|
||||||
env:
|
env:
|
||||||
FILENAME_PREFIX: element-call-embedded-${{ github.event.release.tag_name }}
|
FILENAME_PREFIX: element-call-embedded-${{ github.event.release.tag_name || github.sha }} # Using ${{ env.VERSION }} doesn't work here
|
||||||
steps:
|
steps:
|
||||||
- name: 📥 Download built element-call artifact
|
- name: 📥 Download built element-call artifact
|
||||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
|
||||||
@@ -83,7 +85,7 @@ jobs:
|
|||||||
- name: Publish npm
|
- name: Publish npm
|
||||||
working-directory: embedded/web
|
working-directory: embedded/web
|
||||||
run: |
|
run: |
|
||||||
npm version ${{ github.event.release.tag_name }} --no-git-tag-version
|
npm version ${{ env.VERSION }} --no-git-tag-version
|
||||||
echo "NPM_VERSION=$(jq '.version' --raw-output package.json)" >> "$GITHUB_ENV"
|
echo "NPM_VERSION=$(jq '.version' --raw-output package.json)" >> "$GITHUB_ENV"
|
||||||
npm publish --provenance --access public ${{ env.DRY_RUN && '--dry-run' || '' }}
|
npm publish --provenance --access public ${{ env.DRY_RUN && '--dry-run' || '' }}
|
||||||
env:
|
env:
|
||||||
@@ -128,11 +130,6 @@ jobs:
|
|||||||
distribution: "temurin"
|
distribution: "temurin"
|
||||||
java-version: "17"
|
java-version: "17"
|
||||||
|
|
||||||
- name: Get version
|
|
||||||
run: |
|
|
||||||
VERSION=${{ github.event.release.tag_name }}
|
|
||||||
echo "VERSION=${VERSION:1}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Publish AAR
|
- name: Publish AAR
|
||||||
if: ${{ !env.DRY_RUN }}
|
if: ${{ !env.DRY_RUN }}
|
||||||
# TODO: can we do some kind of dry run?
|
# TODO: can we do some kind of dry run?
|
||||||
@@ -181,11 +178,6 @@ jobs:
|
|||||||
name: build-output-embedded
|
name: build-output-embedded
|
||||||
path: element-call/embedded/ios/Sources/dist
|
path: element-call/embedded/ios/Sources/dist
|
||||||
|
|
||||||
- name: Get version
|
|
||||||
run: |
|
|
||||||
VERSION=${{ github.event.release.tag_name }}
|
|
||||||
echo "VERSION=${VERSION:1}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Checkout element-call-swift
|
- name: Checkout element-call-swift
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user