From e66e3594d35195aae5176f7d62953f5b66f94291 Mon Sep 17 00:00:00 2001 From: Leonard Jonathan Oh Date: Sun, 22 Jan 2023 05:40:26 +0000 Subject: [PATCH] Feature (ci): Add github workflows --- .github/release-drafter.yml | 52 ++++++++++++++++++++++++++++++ .github/workflows/ci-master-pr.yml | 38 ++++++++++++++++++++++ README.md | 6 ++++ 3 files changed, 96 insertions(+) create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/ci-master-pr.yml create mode 100644 README.md diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..f1d241d --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,52 @@ +name-template: 'v$RESOLVED_VERSION 🌈' +tag-template: 'v$RESOLVED_VERSION' +categories: + - title: '🚀 Features' + labels: + - 'feature' + - 'enhancement' + - title: '🐛 Bug Fixes' + labels: + - 'fix' + - 'bugfix' + - 'bug' + - title: '🖊️ Refactors' + labels: + - 'refactor' + - title: '👗 Style' + labels: + - 'style' + - title: '📝 Documentation' + labels: + - 'docs' + - 'documentation' + - title: '🧰 Maintenance' + label: 'chore' +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +version-resolver: + major: + labels: + # - 'major' + - 'breaking' + minor: + labels: + # - 'minor' + - 'feature' + - 'enhancement' + - 'refactor' + patch: + labels: + # - 'patch' + - 'fix' + - 'bugfix' + - 'bug' + - 'style' + - 'docs' + - 'documentation' + - 'chore' + default: patch +sort-by: title +template: | + ## Changes + + $CHANGES diff --git a/.github/workflows/ci-master-pr.yml b/.github/workflows/ci-master-pr.yml new file mode 100644 index 0000000..b80bc3a --- /dev/null +++ b/.github/workflows/ci-master-pr.yml @@ -0,0 +1,38 @@ +name: ci-master-pr + +on: + push: + branches: + - master + tags: + - '**' + pull_request: + branches: + - master + +jobs: + update-draft-release: + if: github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5 + with: + config-name: release-drafter.yml + publish: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + publish-draft-release: + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5 + with: + config-name: release-drafter.yml + publish: true + name: ${{ github.ref_name }} # E.g. 'master' or 'v1.2.3' + tag: ${{ github.ref_name }} # E.g. 'master' or 'v1.2.3' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md new file mode 100644 index 0000000..66da687 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# StatsPython + +[![github-actions](https://github.com/startersclan/StatsPython/workflows/ci-master-pr/badge.svg)](https://github.com/startersclan/StatsPython/actions) +[![github-release](https://img.shields.io/github/v/release/startersclan/StatsPython?style=flat-square)](https://github.com/startersclan/StatsPython/releases/) + +BF2Statistics [`3.x.x`](https://github.com/BF2Statistics/ASP) python files for the BF2 server.