Skip to content

Commit 35ac870

Browse files
authored
Merge pull request #11 from numandev1/chore/add-gh-action
chore: add gh action and update docs
2 parents 6b8e9b0 + ee981cc commit 35ac870

13 files changed

+423
-6
lines changed

.github/FUNDING.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: numandev1
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: http://buymeacoffee.com/numan.dev

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
### Current behavior
11+
12+
### Expected behavior
13+
14+
### Platform
15+
16+
- [X] Android
17+
- [X] iOS
18+
19+
### React Native Version
20+
21+
### React Native Compressor Version
22+
23+
### Reproducible Steps And Demo

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. -->
2+
3+
## Summary
4+
5+
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
6+
7+
## Changelog
8+
9+
10+
11+
[CATEGORY] [TYPE] - Message
12+
13+
## Test Plan
14+
15+
<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. -->

.github/stale.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Configuration for probot-stale - https://github.com/probot/stale
2+
# Number of days of inactivity before an issue becomes stale
3+
daysUntilStale: 30
4+
# Number of days of inactivity before a stale issue is closed
5+
daysUntilClose: 7
6+
# Issues with these labels will never be considered stale
7+
exemptLabels:
8+
- enhancement
9+
# Label to use when marking an issue as stale
10+
staleLabel: Stale
11+
# Comment to post when marking an issue as stale. Set to `false` to disable
12+
markComment: >
13+
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs.
14+
Thank you for your contributions.
15+
# Comment to post when closing a stale issue. Set to `false` to disable
16+
closeComment: >
17+
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
18+
only: issues

.github/workflows/build-android.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build Android App
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- '.github/workflows/build-android.yml'
9+
- 'android/**'
10+
- 'example/android/**'
11+
- 'yarn.lock'
12+
- 'example/yarn.lock'
13+
pull_request:
14+
paths:
15+
- '.github/workflows/build-android.yml'
16+
- 'android/**'
17+
- 'example/android/**'
18+
- 'yarn.lock'
19+
- 'example/yarn.lock'
20+
21+
jobs:
22+
build:
23+
name: Build Android Example App
24+
runs-on: ubuntu-latest
25+
defaults:
26+
run:
27+
working-directory: example/android
28+
steps:
29+
- uses: actions/checkout@v2
30+
31+
- name: Setup JDK 1.8
32+
uses: actions/setup-java@v1
33+
with:
34+
java-version: 1.8
35+
36+
- name: Get yarn cache directory path
37+
id: yarn-cache-dir-path
38+
run: echo "::set-output name=dir::$(yarn cache dir)"
39+
- name: Restore node_modules from cache
40+
uses: actions/cache@v2
41+
id: yarn-cache
42+
with:
43+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
44+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
45+
restore-keys: |
46+
${{ runner.os }}-yarn-
47+
- name: Install node_modules for example/
48+
run: yarn install --frozen-lockfile --cwd ..
49+
50+
- name: Restore Gradle cache
51+
uses: actions/cache@v2
52+
with:
53+
path: |
54+
~/.gradle/caches
55+
~/.gradle/wrapper
56+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
57+
restore-keys: |
58+
${{ runner.os }}-gradle-
59+
- name: Run Gradle Build
60+
run: ./gradlew assembleDebug

.github/workflows/build-ios.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Build iOS App
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- '.github/workflows/build-ios.yml'
9+
- 'ios/**'
10+
- '*.podspec'
11+
- 'example/ios/**'
12+
pull_request:
13+
paths:
14+
- '.github/workflows/build-ios.yml'
15+
- 'ios/**'
16+
- '*.podspec'
17+
- 'example/ios/**'
18+
19+
jobs:
20+
build:
21+
name: Build iOS Example App
22+
runs-on: macOS-latest
23+
defaults:
24+
run:
25+
working-directory: example/ios
26+
steps:
27+
- uses: actions/checkout@v2
28+
29+
- name: Get yarn cache directory path
30+
id: yarn-cache-dir-path
31+
run: echo "::set-output name=dir::$(yarn cache dir)"
32+
- name: Restore node_modules from cache
33+
uses: actions/cache@v2
34+
id: yarn-cache
35+
with:
36+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
37+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
38+
restore-keys: |
39+
${{ runner.os }}-yarn-
40+
- name: Install node_modules for example/
41+
run: yarn install --frozen-lockfile --cwd ..
42+
43+
- name: Setup Ruby (bundle)
44+
uses: ruby/setup-ruby@v1
45+
with:
46+
ruby-version: 2.6
47+
bundler-cache: true
48+
working-directory: example/ios
49+
50+
- name: Restore Pods cache
51+
uses: actions/cache@v2
52+
with:
53+
path: |
54+
example/ios/Pods
55+
~/Library/Caches/CocoaPods
56+
~/.cocoapods
57+
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
58+
restore-keys: |
59+
${{ runner.os }}-pods-
60+
- name: Install Pods
61+
run: bundle exec pod check || bundle exec pod install
62+
- name: Build App
63+
run: "xcodebuild \
64+
-workspace CompressorExample.xcworkspace \
65+
-scheme CompressorExample \
66+
-sdk iphonesimulator \
67+
-configuration Debug \
68+
-destination \"generic/platform=iOS Simulator\" \
69+
build \
70+
CODE_SIGNING_ALLOWED=NO"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: First Issue Or PR
2+
on:
3+
pull_request:
4+
types: [opened, closed]
5+
issues:
6+
types: [opened]
7+
jobs:
8+
run:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: wow-actions/welcome@v1
12+
with:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
FIRST_ISSUE: |
15+
👋 @{{ author }}
16+
Thanks for opening your issue here! **If you find this package useful hit the star🌟!**
17+
18+
FIRST_PR: |
19+
👋 @{{ author }}
20+
Thanks for opening this pull request! **If you find this package useful hit the star🌟!**

.github/workflows/sponsor.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Label sponsors
2+
on:
3+
pull_request:
4+
types: [opened]
5+
issues:
6+
types: [opened]
7+
8+
jobs:
9+
build:
10+
name: is-sponsor-label
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: JasonEtco/is-sponsor-label-action@v1
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/stale-bot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Mark stale issues and pull requests
2+
on:
3+
schedule:
4+
- cron: "30 1 * * *"
5+
jobs:
6+
stale:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
steps:
12+
- uses: actions/stale@v4
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
days-before-stale: 365
16+
stale-issue-message: 'This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
17+
stale-pr-message: 'This PR is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
18+
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
19+
close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.'
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Validate Android
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- '.github/workflows/validate-android.yml'
9+
- 'android/**'
10+
- '.editorconfig'
11+
pull_request:
12+
paths:
13+
- '.github/workflows/validate-android.yml'
14+
- 'android/**'
15+
- '.editorconfig'
16+
17+
jobs:
18+
lint:
19+
name: Gradle Lint
20+
runs-on: ubuntu-latest
21+
defaults:
22+
run:
23+
working-directory: ./android
24+
steps:
25+
- uses: actions/checkout@v2
26+
- name: Setup JDK 1.8
27+
uses: actions/setup-java@v1
28+
with:
29+
java-version: 1.8
30+
31+
- name: Get yarn cache directory path
32+
id: yarn-cache-dir-path
33+
run: echo "::set-output name=dir::$(yarn cache dir)"
34+
- name: Restore node_modules from cache
35+
uses: actions/cache@v2
36+
id: yarn-cache
37+
with:
38+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
39+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
40+
restore-keys: |
41+
${{ runner.os }}-yarn-
42+
- name: Install node_modules
43+
run: yarn install --frozen-lockfile --cwd ..
44+
45+
- name: Restore Gradle cache
46+
uses: actions/cache@v2
47+
with:
48+
path: |
49+
~/.gradle/caches
50+
~/.gradle/wrapper
51+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
52+
restore-keys: |
53+
${{ runner.os }}-gradle-
54+
- name: Run Gradle Lint
55+
run: ./gradlew lint
56+
57+
- name: Parse Gradle Lint Report
58+
uses: yutailang0119/action-android-lint@v1.0.2
59+
with:
60+
xml_path: android/build/reports/lint-results.xml

0 commit comments

Comments
 (0)