Revert "Generated SDK versions: v20111101" (#85) [skip-publish] #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: On Push to Master | |
| on: | |
| push: | |
| branches: [master] | |
| paths: | |
| - 'v20111101/**' | |
| - 'v20250224/**' | |
| jobs: | |
| # Check for skip-publish flag in commit message. This allows skipping publish/release for specific scenarios, | |
| # such as testing generated code, migrating files to new paths, etc. | |
| check-skip-publish: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| skip_publish: ${{ steps.check.outputs.skip_publish }} | |
| steps: | |
| - name: Check for [skip-publish] flag in commit message | |
| id: check | |
| run: | | |
| COMMIT_MSG="${{ github.event.head_commit.message }}" | |
| if [[ "$COMMIT_MSG" == *"[skip-publish]"* ]]; then | |
| echo "skip_publish=true" >> $GITHUB_OUTPUT | |
| echo "🚫 [skip-publish] flag detected - skipping all publish/release jobs" | |
| else | |
| echo "skip_publish=false" >> $GITHUB_OUTPUT | |
| echo "✅ No skip flag - proceeding with publish/release" | |
| fi | |
| # Detect which API versions were modified in this push | |
| # Uses dorny/paths-filter to reliably check which directories changed | |
| # This allows us to run publish/release jobs only for versions that were actually modified | |
| detect-changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| v20111101: ${{ steps.filter.outputs.v20111101 }} | |
| v20250224: ${{ steps.filter.outputs.v20250224 }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: dorny/paths-filter@v2 | |
| id: filter | |
| with: | |
| filters: | | |
| v20111101: | |
| - 'v20111101/**' | |
| v20250224: | |
| - 'v20250224/**' | |
| # Publish and release for each version conditionally | |
| # Only runs if [skip-publish] flag is NOT present AND files for that version were modified | |
| publish-v20111101: | |
| needs: [check-skip-publish, detect-changes] | |
| if: needs.check-skip-publish.outputs.skip_publish == 'false' && needs.detect-changes.outputs.v20111101 == 'true' | |
| uses: ./.github/workflows/publish.yml | |
| with: | |
| version_directory: v20111101 | |
| secrets: inherit | |
| release-v20111101: | |
| needs: [check-skip-publish, detect-changes, publish-v20111101] | |
| if: needs.check-skip-publish.outputs.skip_publish == 'false' && needs.detect-changes.outputs.v20111101 == 'true' | |
| uses: ./.github/workflows/release.yml | |
| with: | |
| version_directory: v20111101 | |
| secrets: inherit | |
| delay-for-v20250224: | |
| runs-on: ubuntu-latest | |
| needs: [check-skip-publish, detect-changes] | |
| if: needs.check-skip-publish.outputs.skip_publish == 'false' | |
| steps: | |
| - name: Brief delay to stagger v20250224 publish | |
| run: sleep 2 | |
| publish-v20250224: | |
| needs: [check-skip-publish, detect-changes, delay-for-v20250224] | |
| if: needs.check-skip-publish.outputs.skip_publish == 'false' && needs.detect-changes.outputs.v20250224 == 'true' | |
| uses: ./.github/workflows/publish.yml | |
| with: | |
| version_directory: v20250224 | |
| secrets: inherit | |
| release-v20250224: | |
| needs: [check-skip-publish, detect-changes, publish-v20250224] | |
| if: needs.check-skip-publish.outputs.skip_publish == 'false' && needs.detect-changes.outputs.v20250224 == 'true' | |
| uses: ./.github/workflows/release.yml | |
| with: | |
| version_directory: v20250224 | |
| secrets: inherit |