feat!: tag released

This commit is contained in:
marcin 2023-03-28 16:34:14 +01:00
parent f9d3daa396
commit 0735972145
No known key found for this signature in database
GPG key ID: 524860A885021BCB
33 changed files with 216 additions and 42 deletions

12
.github/workflows/lint_commits.yml vendored Normal file
View 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
View 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
View 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
View 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