mirror of
https://github.com/PaulHatch/semantic-version.git
synced 2026-04-08 17:14:17 +00:00
feat!: tag released
This commit is contained in:
parent
f9d3daa396
commit
0735972145
33 changed files with 216 additions and 42 deletions
12
.github/workflows/lint_commits.yml
vendored
Normal file
12
.github/workflows/lint_commits.yml
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
name: Lint Commit Messages
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
commitlint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: wagoid/commitlint-github-action@v5.0.2
|
||||
25
.github/workflows/pr_title_lint.yml
vendored
Normal file
25
.github/workflows/pr_title_lint.yml
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# https://github.com/marketplace/actions/conventional-pr-title
|
||||
# This is a Github Action that ensures that your PR title matches the Conventional Commits spec.
|
||||
#
|
||||
# This is helpful when you're using semantic-release with the Conventional Commits preset.
|
||||
# When using the Squash and merge strategy, Github will suggest to use the PR title as the commit message.
|
||||
# With this action you can validate that the PR title will lead to a correct commit message.
|
||||
|
||||
|
||||
name: PR Title Lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- edited
|
||||
- synchronize
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: aslafy-z/conventional-pr-title-action@v3
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
11
.github/workflows/pre_commit.yml
vendored
Normal file
11
.github/workflows/pre_commit.yml
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
name: pre-commit
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v3
|
||||
- uses: pre-commit/action@v3.0.0
|
||||
57
.github/workflows/release.yml
vendored
Normal file
57
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
jobs:
|
||||
create:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Calculate semantic version
|
||||
id: version
|
||||
uses: 3h4x/semantic-version@master
|
||||
with:
|
||||
tag_prefix: "v"
|
||||
major_pattern: "/^(feat|refactor)!:/"
|
||||
minor_pattern: "/^(feat|refactor):/"
|
||||
version_format: "${major}.${minor}.${patch}"
|
||||
bump_each_commit: false
|
||||
search_commit_body: false
|
||||
user_format_type: "json"
|
||||
|
||||
- name: Push tag
|
||||
run: |
|
||||
git tag v${{ steps.version.outputs.version }}
|
||||
git push origin v${{ steps.version.outputs.version }}
|
||||
|
||||
- name: Update CHANGELOG
|
||||
id: changelog
|
||||
uses: requarks/changelog-action@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: v${{ steps.version.outputs.version }}
|
||||
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
allowUpdates: true
|
||||
draft: false
|
||||
name: v${{ steps.version.outputs.version }}
|
||||
tag: v${{ steps.version.outputs.version }}
|
||||
body: ${{ steps.changelog.outputs.changes }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Commit CHANGELOG.md
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
branch: master
|
||||
commit_message: "build(release): update CHANGELOG.md for v${{ steps.version.outputs.version }} [skip ci]"
|
||||
file_pattern: CHANGELOG.md
|
||||
Loading…
Add table
Add a link
Reference in a new issue