diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f7eff2d..fd743d0 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -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}}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef28f69..040affe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }}