mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Create a ci for the front
This commit is contained in:
parent
6a098b6317
commit
01eae3f680
34
.github/workflows/coding-style.yml
vendored
34
.github/workflows/coding-style.yml
vendored
@ -1,15 +1,43 @@
|
|||||||
name: CodingStyle
|
name: Coding Style
|
||||||
on: [pull_request, workflow_dispatch]
|
on: [pull_request, workflow_dispatch]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
back:
|
||||||
name: "Coding style check"
|
name: "Lint Back"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
with:
|
with:
|
||||||
dotnet-version: 6.0.x
|
dotnet-version: 6.0.x
|
||||||
|
|
||||||
- name: Build the app
|
- name: Build the app
|
||||||
run: cd back && dotnet build -p:CheckCodingStyle=true -p:TreatWarningsAsErrors=true '-p:SkipTranscoder=true'
|
run: cd back && dotnet build -p:CheckCodingStyle=true -p:TreatWarningsAsErrors=true '-p:SkipTranscoder=true'
|
||||||
|
|
||||||
|
front:
|
||||||
|
name: "Lint Front"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ./front
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: Find yarn cache
|
||||||
|
id: yarn-cache-path
|
||||||
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
|
||||||
|
- name: Restore cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ steps.yarn-cache-path.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-yarn-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn install --immutable
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: yarn lint
|
||||||
|
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
|||||||
- context: ./front
|
- context: ./front
|
||||||
label: front
|
label: front
|
||||||
image: ghcr.io/${{github.repository_owner}}/kyoo_front
|
image: ghcr.io/${{github.repository_owner}}/kyoo_front
|
||||||
name: Docker build ${{matrix.label}}
|
name: Build ${{matrix.label}}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
2
.github/workflows/documentation.yml
vendored
2
.github/workflows/documentation.yml
vendored
@ -7,7 +7,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Building:
|
Building:
|
||||||
runs-on: [ubuntu-latest]
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: nikeee/docfx-action@v1.0.0
|
- uses: nikeee/docfx-action@v1.0.0
|
||||||
|
70
.github/workflows/native-build.yml
vendored
Normal file
70
.github/workflows/native-build.yml
vendored
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
name: Native build
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update:
|
||||||
|
name: Expo Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ./front
|
||||||
|
steps:
|
||||||
|
- name: Check for EXPO_TOKEN
|
||||||
|
run: |
|
||||||
|
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
|
||||||
|
echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 16.x
|
||||||
|
cache: yarn
|
||||||
|
|
||||||
|
- name: Setup Expo
|
||||||
|
uses: expo/expo-github-action@v7
|
||||||
|
with:
|
||||||
|
expo-version: latest
|
||||||
|
eas-version: latest
|
||||||
|
token: ${{ secrets.EXPO_TOKEN }}
|
||||||
|
|
||||||
|
- name: Restore cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ steps.yarn-cache-path.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-yarn-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn install --immutable
|
||||||
|
|
||||||
|
- name: Build Mobile Release
|
||||||
|
run: yarn build:mobile --release-channel=build | tee log.txt
|
||||||
|
|
||||||
|
- name: Parse Asset URL
|
||||||
|
id: url
|
||||||
|
run: |
|
||||||
|
ASSET_URL=$(grep -eo 'https?://expo\.io/artifacts/[^ ]+' log.txt)
|
||||||
|
echo The android url is $ASSET_URL
|
||||||
|
echo "::set-output name=assetUrl::$ASSET_URL"
|
||||||
|
|
||||||
|
- name: Download APK Asset
|
||||||
|
run: wget -O kyoo.apk ${{ steps.url.outputs.assetUrl }}
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: kyoo.apk
|
||||||
|
path: ./front/kyoo.apk
|
||||||
|
|
||||||
|
|
||||||
|
- name: Upload Release Asset
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: ./example-${{ env.GITHUB_REF_SLUG }}.apk
|
||||||
|
asset_name: example-${{ env.GITHUB_REF_SLUG }}.apk
|
||||||
|
tag: ${{ github.ref }
|
50
.github/workflows/native-update.yml
vendored
Normal file
50
.github/workflows/native-update.yml
vendored
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
name: Native update
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update:
|
||||||
|
name: Expo Update
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ./front
|
||||||
|
steps:
|
||||||
|
- name: Check for EXPO_TOKEN
|
||||||
|
run: |
|
||||||
|
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
|
||||||
|
echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 16.x
|
||||||
|
cache: yarn
|
||||||
|
|
||||||
|
- name: Setup Expo
|
||||||
|
uses: expo/expo-github-action@v7
|
||||||
|
with:
|
||||||
|
expo-version: latest
|
||||||
|
eas-version: latest
|
||||||
|
token: ${{ secrets.EXPO_TOKEN }}
|
||||||
|
|
||||||
|
- name: Find yarn cache
|
||||||
|
id: yarn-cache-path
|
||||||
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
|
||||||
|
- name: Restore cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ steps.yarn-cache-path.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-yarn-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn install --immutable
|
||||||
|
|
||||||
|
- name: Publish update
|
||||||
|
run: yarn update
|
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
@ -20,17 +20,16 @@ jobs:
|
|||||||
repo-token: ${{secrets.GITHUB_TOKEN}}
|
repo-token: ${{secrets.GITHUB_TOKEN}}
|
||||||
running-workflow-name: release
|
running-workflow-name: release
|
||||||
allowed-conclusions: success,skipped,cancelled,neutral
|
allowed-conclusions: success,skipped,cancelled,neutral
|
||||||
# - name: Public the abstractions to nuget
|
- name: Download artifacts
|
||||||
# id: publish_nuget
|
uses: dawidd6/action-download-artifact@v2
|
||||||
# uses: rohith/publish-nuget@v2
|
with:
|
||||||
# with:
|
commit: ${{env.COMMIT_SHA}}
|
||||||
# PROJECT_FILE_PATH: Kyoo.Abstractions/Kyoo.Abstractions.csproj
|
workflow: native-build.yml
|
||||||
# PACKAGE_NAME: Kyoo.Abstractions
|
path: ./artifacts
|
||||||
# VERSION_REGEX: ^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$
|
github_token: ${{secrets.GITHUB_TOKEN}}
|
||||||
# NUGET_KEY: ${{secrets.NUGET_API_KEY}}
|
|
||||||
# INCLUDE_SYMBOLS: true
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
generateReleaseNotes: true
|
generateReleaseNotes: true
|
||||||
|
artifacts: ./artifacts/**/*
|
||||||
token: ${{secrets.GITHUB_TOKEN}}
|
token: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
"ios": "expo start --ios",
|
"ios": "expo start --ios",
|
||||||
"web": "expo start --web",
|
"web": "expo start --web",
|
||||||
"build": "eas build --profile production --platform android",
|
"build": "eas build --profile production --platform android",
|
||||||
"build:dev": "eas build --profile development --platform android"
|
"build:dev": "eas build --profile development --platform android",
|
||||||
|
"update": "eas update --auto"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expo-google-fonts/poppins": "^0.2.2",
|
"@expo-google-fonts/poppins": "^0.2.2",
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
"build:web": "yarn workspace web build",
|
"build:web": "yarn workspace web build",
|
||||||
"build:mobile": "yarn workspace mobile build",
|
"build:mobile": "yarn workspace mobile build",
|
||||||
"build:mobile:dev": "yarn workspace mobile build:dev",
|
"build:mobile:dev": "yarn workspace mobile build:dev",
|
||||||
|
"update": "yarn workspace mobile update",
|
||||||
"lint": "eslint ."
|
"lint": "eslint ."
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user