Skip to content

Commit

Permalink
Creating Workflows (#8)
Browse files Browse the repository at this point in the history
* Create stale.yml

* Creating greetings.yml

* Create labeler.yml

* Create documentation.yml

* Create build.yml
  • Loading branch information
Deaths-Door authored Jul 7, 2024
1 parent d503051 commit f4d4ab1
Show file tree
Hide file tree
Showing 6 changed files with 215 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -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'
67 changes: 67 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
28 changes: 28 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -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

28 changes: 28 additions & 0 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -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.
22 changes: 22 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -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 }}"
27 changes: 27 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit f4d4ab1

Please sign in to comment.