Skip to content

Commit

Permalink
chore: add autorelease workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yndx-birman committed Jan 30, 2024
1 parent 0bee79c commit b0140af
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release
on:
workflow_dispatch:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: '0'

- name: Conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v5
with:
github-token: ${{ secrets.github_token }}
output-file: 'CHANGELOG.md'
preset: 'conventionalcommits'
version-file: './version.json'
skip-git-pull: 'true'
skip-on-empty: 'false'

- name: Create Release
uses: actions/create-release@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}

- name: Update SemVer tag
uses: zyactions/update-semver@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }}
with:
tag: ${{ steps.changelog.outputs.tag }}
3 changes: 3 additions & 0 deletions version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "1.0.0"
}

0 comments on commit b0140af

Please sign in to comment.