diff --git a/.github/workflows/specialize-template.yml b/.github/workflows/Specialize Template.yml similarity index 80% rename from .github/workflows/specialize-template.yml rename to .github/workflows/Specialize Template.yml index 46e06ed..6901ef0 100644 --- a/.github/workflows/specialize-template.yml +++ b/.github/workflows/Specialize Template.yml @@ -3,6 +3,7 @@ name: Specialize Template on: + pull_request: push: branches: [main] @@ -13,7 +14,6 @@ jobs: permissions: contents: write runs-on: ubuntu-latest - if: github.event.repository.name != 'SwiftProjectTemplate' steps: - name: Checkout @@ -25,6 +25,7 @@ jobs: fetch-depth: 0 - name: Specialize Template Parameters + if: github.event.repository.name != 'SwiftProjectTemplate' run: | # Replacement Variables NEW_PROJECT_NAME="${{ github.event.repository.name }}" @@ -34,6 +35,12 @@ jobs: # Run specialization script (requires variables defined above) ./specialize-template.sh "$NEW_PROJECT_BUNDLE_ID_PREFIX" "$NEW_PROJECT_NAME" + + - name: Test Specializing Template Parameters + if: github.event.repository.name == 'SwiftProjectTemplate' + run: | + # Run specialization script (requires variables defined above) + ./specialize-template.sh "com.codebygeorge" "TemplateSpecializationTest" - name: Commit run: | @@ -43,6 +50,7 @@ jobs: git commit -a --amend --no-edit --reset-author - name: Push changes + if: github.event.repository.name != 'SwiftProjectTemplate' uses: ad-m/github-push-action@v0.8.0 with: branch: main