-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (51 loc) · 2.62 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Release
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Get Date
id: date
run: echo "::set-output name=date::$(date +'%m-%d-%Y-%H-%M')"
- name: Run tests
run: sudo docker-compose run frontend bash -c "yarn && yarn test --coverage --outputFile=fga-eps-mds-2021_1-Oraculo-FrontEnd-${{ steps.date.outputs.date }}-test.json --json --watchAll=false"
- name: Create JSON
run: curl -X POST 'https://sonarcloud.io/api/measures/component_tree?component=fga-eps-mds_2021-1-PC-GO-Frontend&branch=devel&metricKeys=files,functions,complexity,comment_lines_density,duplicated_lines_density,coverage,ncloc,security_rating,tests,test_success_density,test_execution_time,reliability_rating&ps=500' > fga-eps-mds-2021_1-Oraculo-FrontEnd-${{ steps.date.outputs.date }}.json
- name: Make release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
fga-eps-mds-2021_1-Oraculo-FrontEnd-${{ steps.date.outputs.date }}.json
- name: Pushes sonar file
uses: dmnemec/copy_file_to_another_repo_action@80732d64341473fa7165a3b2b6c7b0ee164193f8
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: fga-eps-mds-2021_1-Oraculo-FrontEnd-${{ steps.date.outputs.date }}.json
destination_repo: "fga-eps-mds/2021.1-Oraculo"
destination_branch: "master"
destination_folder: "analytics-raw-data"
user_email: ${{ secrets.USER_EMAIL }}
user_name: ${{ secrets.USER_NAME }}
commit_message: "Adding SonarCloud file - fga-eps-mds-2021_1-Oraculo-FrontEnd-${{ steps.date.outputs.date }}.json"
- name: Pushes test file
uses: dmnemec/copy_file_to_another_repo_action@80732d64341473fa7165a3b2b6c7b0ee164193f8
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: fga-eps-mds-2021_1-Oraculo-FrontEnd-${{ steps.date.outputs.date }}-test.json
destination_repo: "fga-eps-mds/2021.1-Oraculo"
destination_branch: "master"
destination_folder: "analytics-raw-data"
user_email: ${{ secrets.USER_EMAIL }}
user_name: ${{ secrets.USER_NAME }}
commit_message: "Adding test file - fga-eps-mds-2021_1-Oraculo-FrontEnd-${{ steps.date.outputs.date }}-test.json"