Skip to content

Commit 4b34e32

Browse files
Merge pull request #9 from fga-eps-mds/132-tag-ci
Chore: add release action
2 parents 3fe74f0 + 0871e03 commit 4b34e32

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+10845
-7187
lines changed

.github/pull_request_template.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Description
2+
3+
<!---Descrição concisa do que deveria ser realizado na issue.-->
4+
5+
## Solve (Issue)
6+
Resolve #N
7+
<!--Link da issue aberta no GitHub.-->
8+
<!--Substituir N pelo número da issue.-->
9+
10+
## Tasks
11+
- [x] Tarefa 1
12+
- [x] Tarefa 2
13+
14+
<!--Tarefas ou passos a serem realizados para conclusão da issue.-->
15+
16+
## Acceptance Criteria
17+
- [x] Critério 1
18+
- [x] Critério 2
19+
20+
<!-- Critérios para que o PR seja aceito. -->
21+
22+
## Assets
23+
24+
<!-- Prints, vídeos, documentos que mostram que a issue foi resolvida e que a solução funciona. -->
25+
<!-- Se não se aplica ao PR, remova este tópico. -->

.github/workflows/ci.yml

+18-14
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,24 @@ name: Frontend CI
33
on: [pull_request]
44

55
jobs:
6-
build:
7-
runs-on: ubuntu-latest
8-
9-
strategy:
10-
matrix:
11-
node-version: [10.x, 12.x]
12-
6+
Build-for-android:
7+
runs-on: macos-latest
138
steps:
149
- uses: actions/checkout@v2
15-
- name: Use Node.js ${{ matrix.node-version }} lint
16-
uses: actions/setup-node@v1
10+
- uses: actions/setup-node@v1
11+
with:
12+
node-version: 12.x
13+
- uses: actions/[email protected]
14+
with:
15+
java-version: '9.0.4' # The JDK version to make available on the path.
16+
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
17+
architecture: x64 # (x64 or x86) - defaults to x64
18+
- uses: expo/expo-github-action@v5
1719
with:
18-
node-version: ${{ matrix.node-version }}
19-
- working-directory: client
20-
run: |
21-
yarn install
22-
yarn lint
20+
expo-version: 3.x
21+
expo-username: ${{ secrets.EXPO_CLI_USERNAME }}
22+
expo-password: ${{ secrets.EXPO_CLI_PASSWORD }}
23+
- name: Install deps
24+
run: yarn install
25+
- name: run lint
26+
run: yarn lint

.github/workflows/release.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release new version
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
env:
10+
url_app: ${{secrets.URL_APP}}
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Set filename
15+
id: report
16+
run: |
17+
echo "::set-output name=report_file_name::fga-eps-mds-${{ github.event.repository.name }}-$(date '+%Y-%m-%d-%H:%M')"
18+
- name: Collect sonar metrics
19+
run: curl "${{env.url_app}}" > ${{ steps.report.outputs.report_file_name }}.json
20+
21+
- name: Bump version and push tag
22+
id: tag_version
23+
uses: mathieudutour/[email protected]
24+
with:
25+
github_token: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Create a GitHub release
28+
uses: ncipollo/release-action@v1
29+
with:
30+
tag: ${{ steps.tag_version.outputs.new_tag }}
31+
name: Release ${{ steps.tag_version.outputs.new_tag }}
32+
body: ${{ steps.tag_version.outputs.changelog }}
33+
artifacts: ${{ steps.report.outputs.report_file_name }}.json

.husky/pre-commit

-4
This file was deleted.

App.js

+26-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,30 @@
11
import React from 'react';
2-
import { HomeScreen } from '_screens';
2+
import { SafeAreaProvider } from 'react-native-safe-area-context';
3+
import { NavigationContainer } from '@react-navigation/native';
4+
import AppLoading from 'expo-app-loading';
5+
import { BottomNavigation } from './src/navigation';
6+
import {
7+
LocationContextProvider,
8+
LanguageContextProvider,
9+
} from './src/contexts';
10+
import { useCustomFonts } from './src/helpers';
311

412
export default function App() {
5-
return <HomeScreen />;
13+
const fontLoaded = useCustomFonts();
14+
15+
if (!fontLoaded) {
16+
return <AppLoading />;
17+
}
18+
19+
return (
20+
<LanguageContextProvider>
21+
<LocationContextProvider>
22+
<SafeAreaProvider>
23+
<NavigationContainer>
24+
<BottomNavigation />
25+
</NavigationContainer>
26+
</SafeAreaProvider>
27+
</LocationContextProvider>
28+
</LanguageContextProvider>
29+
);
630
}

app.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@
2020
"supportsTablet": true
2121
},
2222
"android": {
23+
"permissions": [
24+
"ACCESS_BACKGROUND_LOCATION"
25+
],
2326
"adaptiveIcon": {
2427
"foregroundImage": "./assets/adaptive-icon.png",
2528
"backgroundColor": "#FFFFFF"
26-
}
29+
},
30+
"package": "com.gabrieldvpereira.multilindfrontend"
2731
},
2832
"web": {
2933
"favicon": "./assets/favicon.png"

0 commit comments

Comments
 (0)