diff --git a/.github/workflows/metrics.yml b/.github/workflows/metrics.yml index 21b0569..5ed426f 100644 --- a/.github/workflows/metrics.yml +++ b/.github/workflows/metrics.yml @@ -31,10 +31,28 @@ jobs: git commit -m "Adicionando métricas do repositório ${{ github.event.repository.name }} ${{ github.ref_name }}" git push - # - name: Envia métricas como assets da release - # if: startsWith(github.ref, 'refs/tags') - # uses: AButler/upload-release-assets@v3.0 - # with: - # files: 'analytics-raw-data/*' - # repo-token: ${{ secrets.GITHUB_TOKEN }} - # release-tag: ${{ github.ref_name }} + - name: Debugging Information + run: | + echo "GITHUB REF: ${{ github.ref }}" + echo "GITHUB REF_NAME: ${{ github.ref_name }}" + echo "GITHUB EVENT_NAME: ${{ github.event_name }}" + + - name: Create Release + if: startsWith(github.ref, 'refs/tags') + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref_name }} + release_name: Release ${{ github.ref_name }} + draft: false + prerelease: false + + - name: Envia métricas como assets da release + if: startsWith(github.ref, 'refs/tags') + uses: AButler/upload-release-assets@v3.0 + with: + files: 'analytics-raw-data/*' + repo-token: ${{ secrets.GITHUB_TOKEN }} + release-tag: ${{ github.ref_name }}