Skip to content

Commit

Permalink
Create release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysRogeres authored Jun 16, 2023
1 parent 97ed832 commit d9fc2fb
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: UsuarioService-Release
on:
push:
tags:
- 'v*'
pull_request:
types: [closed]

jobs:
generate-release:
runs-on: ubuntu-latest
steps:
- name: Get file name
id: name
run: echo "::set-output name=file_name::fga-eps-mds-2023.1-DNIT-UsuarioService-$(TZ='America/Sao_Paulo' date +'%m-%d-%Y-%H-%M-%S')-${{github.ref_name}}"

- name: Copy repository
uses: actions/checkout@v2
- run: wget $METRICS_URL -O ${{ steps.name.outputs.file_name }}.json
env:
METRICS_URL: ${{ secrets.METRICS_URL }}
- uses: actions/upload-artifact@v2
with:
name: ${{ steps.name.outputs.file_name }}.json
path: ${{ steps.name.outputs.file_name }}.json

- name: Send metrics to doc repo
uses: dmnemec/[email protected]
env:
API_TOKEN_GITHUB: ${{ secrets.TOKEN_GITHUB }}
with:
source_file: ${{ steps.name.outputs.file_name }}.json
destination_repo: 'fga-eps-mds/2023.1-Dnit-DOC'
destination_folder: 'analytics-raw-data'
user_email: ${{ secrets.GIT_EMAIL}}
user_name: ${{ secrets.GIT_USER }}
commit_message: Métricas automáticas da release ${{github.ref_name}} - ${{ github.event.repository.name }}

0 comments on commit d9fc2fb

Please sign in to comment.