ci: fix app artifacts for tags (#504)

* ci: fix app artifacts for tags

* ci: fix app artifacts for tags

* ci: fix app artifacts for tags
This commit is contained in:
l5y
2025-11-23 23:23:19 +01:00
committed by GitHub
parent f8ed75a095
commit 4946ea1751
2 changed files with 15 additions and 3 deletions

View File

@@ -44,11 +44,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v5
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"

View File

@@ -97,22 +97,34 @@ jobs:
needs:
- android-release
- ios-release
if: ${{ github.ref_name matches '^v[0-9]+\\.[0-9]+\\.[0-9]+$' }}
env:
TAG_NAME: ${{ github.ref_name }}
PUBLISH_RELEASE: "false"
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
steps:
- uses: actions/checkout@v5
- name: Check tag format
run: |
set -euo pipefail
if [[ "${TAG_NAME}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "PUBLISH_RELEASE=true" >> "$GITHUB_ENV"
else
echo "Non point release tag (${TAG_NAME}); skipping publish."
fi
- name: Download Android artifacts
if: env.PUBLISH_RELEASE == 'true'
uses: actions/download-artifact@v4
with:
name: potatomesh-reader-android-${{ env.TAG_NAME }}
path: artifacts/android
- name: Download iOS artifacts
if: env.PUBLISH_RELEASE == 'true'
uses: actions/download-artifact@v4
with:
name: potatomesh-reader-ios-${{ env.TAG_NAME }}
path: artifacts/ios
- name: Attach assets to release
if: env.PUBLISH_RELEASE == 'true'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}