From 60158578eda1e84136eb8da94e36ed12d313dd96 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Sun, 25 Aug 2024 18:41:13 +0100 Subject: [PATCH] Add .github folder --- .github/ISSUE_TEMPLATE/bug_report.md | 24 ++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 15 ++++++ .github/PULL_REQUEST_TEMPLATE | 29 +++++++++++ .../workflows/gradle-wrapper-validation.yml | 19 ++++++++ .github/workflows/pre-merge.yaml | 32 +++++++++++++ .github/workflows/publish-release.yaml | 47 ++++++++++++++++++ .github/workflows/publish-snapshot.yaml | 48 +++++++++++++++++++ .gitignore | 2 +- 8 files changed, 215 insertions(+), 1 deletion(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE create mode 100644 .github/workflows/gradle-wrapper-validation.yml create mode 100644 .github/workflows/pre-merge.yaml create mode 100644 .github/workflows/publish-release.yaml create mode 100644 .github/workflows/publish-snapshot.yaml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..6dd8404 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,24 @@ +--- +name: Bug report +about: Create a report to help us improve +--- + +## ๐Ÿ› Describe the bug + + +## โš ๏ธ Current behavior + + +## โœ… Expected behavior + + +## ๐Ÿ’ฃ Steps to reproduce + + +## ๐Ÿ“ท Screenshots + + +## ๐Ÿ“ฑ Tech info + - Device: + - OS: + - Library/App version: diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..b93222d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,15 @@ +--- +name: Feature request +about: Suggest an idea for this project +--- + +## โš ๏ธ Is your feature request related to a problem? Please describe + + +## ๐Ÿ’ก Describe the solution you'd like + + +## ๐Ÿคš Do you want to develop this feature yourself? + +- [ ] Yes +- [ ] No diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE new file mode 100644 index 0000000..2c4bc46 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE @@ -0,0 +1,29 @@ + + +## ๐Ÿš€ Description + + +## ๐Ÿ“„ Motivation and Context + + + +## ๐Ÿงช How Has This Been Tested? + + + + +## ๐Ÿ“ท Screenshots (if appropriate) + + +## ๐Ÿ“ฆ Types of changes + +- [ ] 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 + + +- [ ] My code follows the code style of this project. +- [ ] My change requires a change to the documentation. +- [ ] I have updated the documentation accordingly. \ No newline at end of file diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml new file mode 100644 index 0000000..7304803 --- /dev/null +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -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@v4 + - name: Validate Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 + diff --git a/.github/workflows/pre-merge.yaml b/.github/workflows/pre-merge.yaml new file mode 100644 index 0000000..863e787 --- /dev/null +++ b/.github/workflows/pre-merge.yaml @@ -0,0 +1,32 @@ +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 }} + if: ${{ !contains(github.event.head_commit.message, 'ci skip') }} + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: "zulu" + java-version: "17" + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + + - name: Run Gradle + run: ./gradlew build publishToMavenLocal --continue diff --git a/.github/workflows/publish-release.yaml b/.github/workflows/publish-release.yaml new file mode 100644 index 0000000..7be981f --- /dev/null +++ b/.github/workflows/publish-release.yaml @@ -0,0 +1,47 @@ +name: Publish Release +on: + push: + tags: + - '*' + workflow_dispatch: + +jobs: + publish: + if: ${{ github.repository == 'cortinico/myonnaise'}} + runs-on: [ubuntu-latest] + env: + GRADLE_OPTS: -Dorg.gradle.parallel=false + + steps: + + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '17' + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + + - name: Publish to Maven Local + run: ./gradlew publishToMavenLocal + env: + ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }} + ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }} + + - name: Upload Build Artifacts + uses: actions/upload-artifact@v3 + with: + name: 'release-artifacts' + path: '~/.m2/repository/' + + - name: Publish to the Snapshot Repository + run: ./gradlew publishReleasePublicationToNexusRepository + env: + ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }} + ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }} + ORG_GRADLE_PROJECT_NEXUS_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_NEXUS_USERNAME }} + ORG_GRADLE_PROJECT_NEXUS_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_NEXUS_PASSWORD }} diff --git a/.github/workflows/publish-snapshot.yaml b/.github/workflows/publish-snapshot.yaml new file mode 100644 index 0000000..e3c4f40 --- /dev/null +++ b/.github/workflows/publish-snapshot.yaml @@ -0,0 +1,48 @@ +name: Publish Snapshot +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + publish: + if: ${{ github.repository == 'cortinico/myonnaise'}} + runs-on: [ubuntu-latest] + env: + GRADLE_OPTS: -Dorg.gradle.parallel=false + + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '17' + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + + - name: Publish to Maven Local + run: ./gradlew publishToMavenLocal + env: + ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }} + ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }} + ORG_GRADLE_PROJECT_USE_SNAPSHOT: true + + - name: Upload Build Artifacts + uses: actions/upload-artifact@v3 + with: + name: 'snapshot-artifacts' + path: '~/.m2/repository/' + + - name: Publish to the Snapshot Repository + run: ./gradlew publishReleasePublicationToSnapshotRepository + env: + ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }} + ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }} + ORG_GRADLE_PROJECT_NEXUS_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_NEXUS_USERNAME }} + ORG_GRADLE_PROJECT_NEXUS_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_NEXUS_PASSWORD }} + ORG_GRADLE_PROJECT_USE_SNAPSHOT: true diff --git a/.gitignore b/.gitignore index 30c2aae..e0c082e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .* -!.circleci +!.github *.iml local.properties build/