2022-09-19 09:18:36 +00:00
|
|
|
# GitHub Actions Workflow verifies if the template repository is consistent with all provided content.
|
|
|
|
|
|
|
|
name: Template Verify
|
|
|
|
on:
|
2023-08-07 13:20:46 +00:00
|
|
|
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g., for dependabot pull requests)
|
2022-09-19 09:18:36 +00:00
|
|
|
push:
|
|
|
|
branches: [main]
|
2022-09-19 09:27:17 +00:00
|
|
|
paths: ['**/gradle.properties']
|
2022-09-19 09:18:36 +00:00
|
|
|
# Trigger the workflow on any pull request
|
|
|
|
pull_request:
|
2022-09-19 09:27:17 +00:00
|
|
|
paths: ['**/gradle.properties']
|
2022-09-19 09:18:36 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
name: Template Verify
|
|
|
|
if: github.event.repository.name == 'intellij-platform-plugin-template'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
version: ${{ steps.properties.outputs.version }}
|
|
|
|
changelog: ${{ steps.properties.outputs.changelog }}
|
|
|
|
steps:
|
|
|
|
|
|
|
|
# Check out current repository
|
|
|
|
- name: Fetch Sources
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
# Compare `gradle.properties` with `.github/template-cleanup/gradle.properties`
|
|
|
|
- name: Verify gradle.properties
|
|
|
|
run: |
|
|
|
|
echo "\`\`\`diff" >> $GITHUB_STEP_SUMMARY
|
|
|
|
|
|
|
|
diff -U 0 \
|
|
|
|
-I '^pluginVersion' \
|
|
|
|
-I '^pluginGroup' \
|
|
|
|
-I '^pluginName' \
|
2022-11-17 21:20:27 +00:00
|
|
|
-I '^pluginRepositoryUrl' \
|
2022-09-19 09:18:36 +00:00
|
|
|
--label .github/template-cleanup/gradle.properties \
|
|
|
|
--label gradle.properties \
|
|
|
|
.github/template-cleanup/gradle.properties gradle.properties \
|
|
|
|
>> $GITHUB_STEP_SUMMARY
|
|
|
|
|
|
|
|
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|