Skip to content

Commit

Permalink
feat: switch to release-it
Browse files Browse the repository at this point in the history
  • Loading branch information
Fllorent0D committed Jan 6, 2023
1 parent 434a48b commit 56435e6
Show file tree
Hide file tree
Showing 5 changed files with 7,362 additions and 272 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,24 @@ jobs:
- run: npm run test
- run: npm run build

bump-version:
name: 'Bump Version on main'
release:
runs-on: ubuntu-latest
needs: tests

steps:
- name: 'Checkout source code'
uses: 'actions/checkout@v3'
with:
ref: ${{ github.ref }}
- name: 'Automated Version Bump'
id: version-bump
uses: 'phips28/gh-action-bump-version@master'
- uses: actions/checkout@v2
with:
tag-prefix: 'v'
fetch-depth: 0
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- run: npm install
- run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Output Step'
env:
NEW_TAG: ${{ steps.version-bump.outputs.newTag }}
run: echo "new tag $NEW_TAG"

deploy:
runs-on: ubuntu-latest
needs: bump-version
steps:
- uses: actions/checkout@v3
with:
Expand Down
27 changes: 27 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"git": {
"commitMessage": "chore: release v${version}"
},
"github": {
"release": true
},
"plugins": {
"@release-it/conventional-changelog": {
"infile": "CHANGELOG.md",
"preset": {
"name": "conventionalcommits",
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{}
]
}
}
}
}
Empty file added CHANGELOG.md
Empty file.
Loading

0 comments on commit 56435e6

Please sign in to comment.