From 5c7fcdae062169316983eb5cf6b44d8f1572365f Mon Sep 17 00:00:00 2001 From: P0nk Date: Sun, 16 Oct 2022 08:34:45 +0200 Subject: [PATCH] Add action to automatically tag commits Using this action: https://github.com/marketplace/actions/github-tag-bump The idea is that the repo will be versioned in SemVer format, such as "v0.5.3". When a PR is merged, a new version will automatically be added. The new version is generated based on the latest tag, and the part that is bumped is dictated by the merge commit message, either #major, #minor (default) or #patch. This way I (the repo owner) has control over versioning, and other contributors don't have to bother with anything. --- .github/workflows/bump-version.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/bump-version.yml diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml new file mode 100644 index 0000000000..4cd2ae0292 --- /dev/null +++ b/.github/workflows/bump-version.yml @@ -0,0 +1,23 @@ +name: Bump version +on: + pull_request: + #types: + # - closed + branches: + - master + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: '0' + + - name: Bump version and push tag + uses: anothrNick/github-tag-action@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + WITH_V: true + DRY_RUN: true \ No newline at end of file