diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..bc69f5b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +--- +name: Releases + +on: + push: + pull_request: + # tags: + # - "*" + +jobs: + releases: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + # - name: Generating commit logs + # run: | + # cd commits && ./generate.sh -t 0 + # LOGS_DIR="output-$(date +%Y)-$(date +%W)" + # mv output $LOGS_DIR + # tar -czf mariadb-stats.tgz $LOGS_DIR + - name: Generating pull requests stats + run: | + # calculate week-numbers + WEEK_NUMBER=$(date +%W) + YEAR=$(date +%Y) + TILL="${YEAR}-W${WEEK_NUMBER}" + FROM="${YEAR}-W1" + cd pull-requests && ./get_prs.py -v "$FROM" "$TILL" + mv prs*.csv prs.csv + - uses: ncipollo/release-action@v1 + with: + artifacts: "output/mariadb-stats.tgz,pull-requests/prs.csv" + bodyFile: "commits/ci_release.md" diff --git a/ci_release.md b/ci_release.md new file mode 100644 index 0000000..7d65730 --- /dev/null +++ b/ci_release.md @@ -0,0 +1,20 @@ +# A metrics snapshot up to TODO var + +The output files include: + +``` +people-*.csv - breakdown of commits by individual +organisations-*.csv - breakdown of commits by organisations +categories-*.csv - breakdown of commits by category +prs.csv - breakdown of pull request statistics +``` + +The `maria-stats.tgz` file contains the commit results for the following repositories: + +- +- +- +- +- + +The `prs.csv` file is just for the MariaDB Server tree.