Initial commit

This commit is contained in:
You Qi
2023-04-26 17:45:47 +08:00
commit 884242f8cd
35 changed files with 2124 additions and 0 deletions

24
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,24 @@
---
name: Bug report
about: Create a report to help us improve
---
## 🐛 Describe the bug
<!-- A clear and concise description of what the bug is. -->
## ⚠️ Current behavior
<!-- A clear and concise description of what you expected to happen. -->
## ✅ Expected behavior
<!-- A clear and concise description of what you expected to happen. -->
## 💣 Steps to reproduce
<!-- How we can reproduce the behavior: -->
## 📷 Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->
## 📱 Tech info
- Device: <!-- e.g. Nexus One -->
- OS: <!-- e.g. 7.1.1 -->
- Library/App version: <!-- e.g. 1.0.0 -->

View File

@@ -0,0 +1,15 @@
---
name: Feature request
about: Suggest an idea for this project
---
## ⚠️ Is your feature request related to a problem? Please describe
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
## 💡 Describe the solution you'd like
<!-- A clear and concise description of what you want to happen. -->
## 🤚 Do you want to develop this feature yourself?
<!-- Put an `x` symbol into braces of desired choice. -->
- [ ] Yes
- [ ] No

26
.github/PULL_REQUEST_TEMPLATE vendored Normal file
View File

@@ -0,0 +1,26 @@
<!-- Thanks for taking the time to write this Pull Request ❤️ -->
## 🚀 Description
<!-- Describe your changes in detail -->
## 📄 Motivation and Context
<!-- Why is this change required? What problem does it solve? -->
<!-- If it fixes an open issue, please link to the issue here. -->
## 🧪 How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, tests ran to see how -->
<!-- your change affects other areas of the code, etc. -->
## 📦 Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
## ✅ Checklist
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.

8
.github/renovate.json vendored Normal file
View File

@@ -0,0 +1,8 @@
{
"labels": [
"dependencies"
],
"extends": [
"config:base"
]
}

View File

@@ -0,0 +1,19 @@
name: Validate Gradle Wrapper
on:
push:
branches:
- main
pull_request:
branches:
- '*'
jobs:
validation:
name: Validation
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

36
.github/workflows/pre-merge.yaml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Pre Merge Checks
on:
push:
branches:
- main
pull_request:
branches:
- '*'
jobs:
gradle:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Cache Gradle Caches
uses: gradle/gradle-build-action@v2
- name: Run Gradle tasks
run: ./gradlew preMerge --continue
# We do a run of the new task `templateExample` created by the plugin
- name: Run the plugin
run: ./gradlew templateExample --message="Test Run" --tag=CI
if: success()
# And we verify that the output of the file is correct.
- name: Verify the plugin output
run: grep -Fxq "[CI] Test Run" ./example/build/template-example.txt
if: success()

24
.github/workflows/publish-plugin.yaml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Publish Plugin to Portal
on:
push:
tags:
- '*'
jobs:
gradle:
runs-on: ubuntu-latest
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Cache Gradle Caches
uses: gradle/gradle-build-action@v2
- name: Run Gradle tasks
run: ./gradlew preMerge --continue
- name: Publish on Plugin Portal
run: ./gradlew --project-dir plugin-build setupPluginUploadFromEnvironment publishPlugins
if: success()