diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..ad66a59 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,43 @@ +workflows: +- changed-files: + - any-glob-to-any-file: '.github/**' + +astro-core: +- changed-files: + - any-glob-to-any-file: 'astroplayer-core/**' + +astro-ui: +- changed-files: + - any-glob-to-any-file: 'astroplayer-ui/**' + +docs: +- changed-files: + - any-glob-to-any-file: 'docs/**' + + +android: +- changed-files: + - any-glob-to-any-file: '**/**/androidMain' + - any-glob-to-any-file: '**/**/androidTest' + +ios: +- changed-files: + - any-glob-to-any-file: '**/**/iosMain' + - any-glob-to-any-file: '**/**/iosTest' + - any-glob-to-any-file: '**/**/appleMain' + - any-glob-to-any-file: '**/**/appleTest' + +desktop: +- changed-files: + - any-glob-to-any-file: '**/**/desktopMain' + - any-glob-to-any-file: '**/**/desktopTest' + +wasm: +- changed-files: + - any-glob-to-any-file: '**/**/wasmJsMain' + - any-glob-to-any-file: '**/**/wasmJsTest' + +common: +- changed-files: + - any-glob-to-any-file: '**/**/commonMain' + - any-glob-to-any-file: '**/**/commonTest' \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..29b468e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,67 @@ +name: Build Modules CI + +on: + workflow_dispatch: + push: + branches: + - '**' + +jobs: + Android: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-java@v3 + with: + distribution: "adopt" + java-version: "17" + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + + # To fix ./gradlew: Permission denied + - run: chmod +x gradlew + + - name: Build Android + run: ./gradlew astroplayer-core:androidDebugSourcesJar astroplayer-core:androidReleaseSourcesJar astroplayer-ui:androidDebugSourcesJar astroplayer-ui:androidReleaseSourcesJar + + Desktop: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-java@v3 + with: + distribution: "adopt" + java-version: "17" + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + + # To fix ./gradlew: Permission denied + - run: chmod +x gradlew + + - name: Build Desktop + run: ./gradlew astroplayer-core:desktopMainClasses astroplayer-core:desktopTestClasses astroplayer-ui:desktopMainClasses astroplayer-ui:desktopTestClasses + Wasm: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-java@v3 + with: + distribution: "adopt" + java-version: "17" + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + + # To fix ./gradlew: Permission denied + - run: chmod +x gradlew + + - name: Build WASM + run: ./gradlew astroplayer-core:wasmJsMainClasses astroplayer-core:wasmJsTestClasses astroplayer-ui:wasmJsMainClasses astroplayer-ui:wasmJsTestClasses diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 0000000..55fb5e6 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,28 @@ +name: Generate Documentation + +on: + push: + branches: + - main +jobs: + documentation: + + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'adopt' + java-version: 17 + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + # To fix ./gradlew: Permission denied + - run: chmod +x gradlew + - name: Generate Documentation + run: ./gradlew dokkaHtmlMultiModule + \ No newline at end of file diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 0000000..0363f44 --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,28 @@ +name: Greetings + +on: [pull_request_target, issues] + +jobs: + greeting: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: | + Hi @${{ github.actor }}! 👋 + + Thank you for opening your first issue in the astroplayer-kt repository! We appreciate your interest in contributing to the project. Our community and maintainers will review your issue soon. + + In the meantime, please make sure to: + - Describe the issue clearly and provide as much context as possible. + - Include any relevant code snippets or screenshots that might help us understand the issue better. + + Thanks for helping us improve AstroPlayer! + pr-message: | + Hi @${{ github.actor }}! 👋 + + Thank you for submitting your first pull request to the astroplayer-kt repository! We truly appreciate your effort to contribute to the project. Our maintainers will review your pull request shortly. diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..d23c4d4 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,22 @@ +# This workflow will triage pull requests and apply a label based on the +# paths that are modified in the pull request. +# +# To use this workflow, you will need to set up a .github/labeler.yml +# file with configuration. For more information, see: +# https://github.com/actions/labeler + +name: Labeler +on: [pull_request_target] + +jobs: + label: + + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + + steps: + - uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..4df78db --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,27 @@ +# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. +# +# You can adjust the behavior by modifying this file. +# For more information, see: +# https://github.com/actions/stale +name: Mark stale issues and pull requests + +on: + schedule: + - cron: '30 12 * * *' + +jobs: + stale: + + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + + steps: + - uses: actions/stale@v5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'Stale issue message' + stale-pr-message: 'Stale pull request message' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity'