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.
23 lines
479 B
YAML
23 lines
479 B
YAML
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 |