-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe9c104
commit 7f48c9d
Showing
1 changed file
with
0 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
# NOTES: | ||
# generating changelog for release is performed twice because first changelog generates for release notes, | ||
# so it runs before release step, and second changelog generates for updating CHANGELOG.md file, so it runs after release step. | ||
# if i'd try to generate changelog once, changes will be marked as "master" branch changes, cause there's no new tag yet. | ||
|
||
name: styleguide client release | ||
|
||
on: | ||
|
@@ -11,74 +6,7 @@ on: | |
- main | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: get prevTag | ||
id: prevTag | ||
uses: "WyriHaximus/github-action-get-previous-tag@v1" | ||
|
||
# for release notes // why 2 changelogs? see NOTES | ||
- name: generate Release Changelog | ||
id: changelog | ||
uses: requarks/changelog-action@v1 | ||
continue-on-error: true | ||
with: | ||
writeToFile: false | ||
reverseOrder: true | ||
excludeTypes: build | ||
token: ${{ github.token }} | ||
fromTag: ${{ github.ref_name }} | ||
toTag: ${{ steps.prevTag.outputs.tag }} | ||
|
||
- name: get-npm-version | ||
id: package-version | ||
uses: martinbeentjes/[email protected] | ||
|
||
- name: Create release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: "v${{ steps.package-version.outputs.current-version}}" | ||
name: "@webitel/styleguide v${{ steps.package-version.outputs.current-version}}" | ||
body: ${{ steps.changelog.outputs.changes }} | ||
|
||
# update tags list after prev step release, so that we fetch new tag, created by prev step | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: get newTag | ||
id: newTag | ||
uses: "WyriHaximus/github-action-get-previous-tag@v1" | ||
|
||
# update CHANGELOG.md file // why 2 changelogs? see NOTES | ||
- name: update Release Changelog | ||
id: update-changelog | ||
uses: requarks/changelog-action@v1 | ||
continue-on-error: true | ||
with: | ||
reverseOrder: true | ||
excludeTypes: build | ||
token: ${{ github.token }} | ||
fromTag: ${{ steps.newTag.outputs.tag }} | ||
toTag: ${{ steps.prevTag.outputs.tag }} | ||
|
||
- name: commit changelog | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: autoupdate changelog | ||
file_pattern: 'CHANGELOG.md' | ||
push_options: --force | ||
|
||
publish: | ||
needs: [ release ] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|