Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/publish-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,19 @@ jobs:
echo "::notice::[Docker] No version found, publishing latest only"
fi

- name: set git tag if not yet set
if: ${{ env.DOCKER_VERSION_TAG != '' && (inputs.artifact_path == '' || steps.check_artifact_exists.outputs.exists == 'true') && matrix.docker == fromJson(inputs.docker_meta)[0] }}
run: |
if git ls-remote --tags origin "${{ env.DOCKER_VERSION_TAG }}" | grep -q "${{ env.DOCKER_VERSION_TAG }}"; then
echo "::warning::[Docker] Tag ${{ env.DOCKER_VERSION_TAG }} already exists, skipping tag creation"
else
git tag "${{ env.DOCKER_VERSION_TAG }}"
git push origin "${{ env.DOCKER_VERSION_TAG }}"
echo "::notice::[Docker] Created and pushed tag ${{ env.DOCKER_VERSION_TAG }}"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: run docker pre script
if: ${{ inputs.docker_pre != '' && (inputs.artifact_path == '' || steps.check_artifact_exists.outputs.exists == 'true') }}
run: ${{ inputs.docker_pre }}
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/publish-npm-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,31 @@ jobs:
${{ inputs.root_dir }}/yarn.lock
${{ inputs.root_dir }}/pnpm-lock.yaml

- name: extract version from package.json
if: ${{ steps.check_artifact_exists.outputs.exists == 'true' }}
id: extract_version
run: |
VERSION=$(jq -r .version package.json)
if [[ -z "${VERSION}" || "${VERSION}" == "null" ]]; then
echo "::warning::[NPM] Could not extract version from package.json, skipping git tag"
else
echo "release_tag=v${VERSION}" >> $GITHUB_OUTPUT
echo "::notice::[NPM] Extracted version: v${VERSION}"
fi

- name: set git tag if not yet set
if: ${{ steps.check_artifact_exists.outputs.exists == 'true' && steps.extract_version.outputs.release_tag != '' }}
run: |
if git ls-remote --tags origin "${{ steps.extract_version.outputs.release_tag }}" | grep -q "${{ steps.extract_version.outputs.release_tag }}"; then
echo "::warning::[NPM] Tag ${{ steps.extract_version.outputs.release_tag }} already exists, skipping tag creation"
else
git tag "${{ steps.extract_version.outputs.release_tag }}"
git push origin "${{ steps.extract_version.outputs.release_tag }}"
echo "::notice::[NPM] Created and pushed tag ${{ steps.extract_version.outputs.release_tag }}"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: install latest npm for OIDC support
run: npm install -g npm@latest

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-python-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
if: ${{ steps.check_artifact_exists.outputs.exists == 'true' }}
run: |
if git ls-remote --tags origin "${{ steps.extract_version.outputs.release_tag }}" | grep -q "${{ steps.extract_version.outputs.release_tag }}"; then
echo "::notice::[PyPI] Tag ${{ steps.extract_version.outputs.release_tag }} already exists, skipping"
echo "::warning::[PyPI] Tag ${{ steps.extract_version.outputs.release_tag }} already exists, skipping tag creation"
else
git tag "${{ steps.extract_version.outputs.release_tag }}"
git push origin "${{ steps.extract_version.outputs.release_tag }}"
Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/release-android-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,32 @@ jobs:
echo "RELEASE_TAG=v${VERSION}" >> $GITHUB_ENV
echo "::notice::[Release] Extracted version: v${VERSION}"

- name: set git tag if not yet set
if: ${{ steps.check_build_artifact_exists.outputs.exists == 'true' && steps.check_app_artifact_exists.outputs.exists == 'true' }}
run: |
if git ls-remote --tags origin "${{ env.RELEASE_TAG }}" | grep -q "${{ env.RELEASE_TAG }}"; then
echo "::warning::[Release] Tag ${{ env.RELEASE_TAG }} already exists, skipping tag creation"
else
git tag "${{ env.RELEASE_TAG }}"
git push origin "${{ env.RELEASE_TAG }}"
echo "::notice::[Release] Created and pushed tag ${{ env.RELEASE_TAG }}"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: check if release already exists
if: ${{ steps.check_build_artifact_exists.outputs.exists == 'true' && steps.check_app_artifact_exists.outputs.exists == 'true' }}
id: check_release_exists
run: |
if gh release view ${{ env.RELEASE_TAG }} &>/dev/null; then
echo "::error::[Release] Release with tag ${{ env.RELEASE_TAG }} already exists"
echo "::error::[Release] Bump the version in package.json to create a new release"
exit 3
if gh release view "${{ env.RELEASE_TAG }}" &>/dev/null; then
echo "::warning::[Release] Release ${{ env.RELEASE_TAG }} already exists, skipping"
echo "release_exists=true" >> $GITHUB_OUTPUT
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: softprops/action-gh-release@v2
if: ${{ steps.check_build_artifact_exists.outputs.exists == 'true' && steps.check_app_artifact_exists.outputs.exists == 'true' }}
if: ${{ steps.check_build_artifact_exists.outputs.exists == 'true' && steps.check_app_artifact_exists.outputs.exists == 'true' && steps.check_release_exists.outputs.release_exists != 'true' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ env.RELEASE_TAG }}
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/release-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,36 @@ jobs:
echo "release_tag=v${VERSION}" >> $GITHUB_OUTPUT
echo "::notice::[Release] Extracted version: v${VERSION}"

- name: set git tag if not yet set
if: ${{ steps.check_artifact_exists.outputs.exists == 'true' }}
run: |
if git ls-remote --tags origin "${{ steps.extract_version.outputs.release_tag }}" | grep -q "${{ steps.extract_version.outputs.release_tag }}"; then
echo "::warning::[Release] Tag ${{ steps.extract_version.outputs.release_tag }} already exists, skipping tag creation"
else
git tag "${{ steps.extract_version.outputs.release_tag }}"
git push origin "${{ steps.extract_version.outputs.release_tag }}"
echo "::notice::[Release] Created and pushed tag ${{ steps.extract_version.outputs.release_tag }}"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: check if release already exists
if: ${{ steps.check_artifact_exists.outputs.exists == 'true' }}
id: check_release_exists
run: |
if gh release view ${{ steps.extract_version.outputs.release_tag }} &>/dev/null; then
echo "::error::[Release] Release with tag ${{ steps.extract_version.outputs.release_tag }} already exists"
echo "::error::[Release] Bump the version in the manifest to create a new release"
exit 3
if gh release view "${{ steps.extract_version.outputs.release_tag }}" &>/dev/null; then
echo "::warning::[Release] Release ${{ steps.extract_version.outputs.release_tag }} already exists, skipping"
echo "release_exists=true" >> $GITHUB_OUTPUT
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: run release pre script if present
if: ${{ inputs.release_pre != '' && steps.check_artifact_exists.outputs.exists == 'true' }}
if: ${{ inputs.release_pre != '' && steps.check_artifact_exists.outputs.exists == 'true' && steps.check_release_exists.outputs.release_exists != 'true' }}
run: ${{ inputs.release_pre }}

- uses: softprops/action-gh-release@v2
if: ${{ steps.check_artifact_exists.outputs.exists == 'true' }}
if: ${{ steps.check_artifact_exists.outputs.exists == 'true' && steps.check_release_exists.outputs.release_exists != 'true' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ steps.extract_version.outputs.release_tag }}
Expand Down
Loading