Skip to content

Merge pull request #213 from taliesins/update_dependencies_2 #20

Merge pull request #213 from taliesins/update_dependencies_2

Merge pull request #213 from taliesins/update_dependencies_2 #20

name: Create tag
on:
workflow_dispatch:
env:
GIT_CHGLOG_VERSION: "0.15.4"
SVU_VERSION: "1.12.0"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
# Fetches entire history, so we can analyze commits since last tag
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-git-chglog@v1
with:
git-chglog-version: ${{ env.GIT_CHGLOG_VERSION}}
- uses: obfu5c8/action-svu
id: install_svu
with:
type: none
svu-version: ${{ env.SVU_VERSION}}
- name: get version
id: get_version
run: |
current_version="$(svu current --tag-mode current-branch --strip-prefix)"
prerelease_version="$(svu prerelease --tag-mode all-branches --strip-prefix --pre-release prerelease)"
release_version="$(svu next --tag-mode all-branches --strip-prefix)"
echo ::set-output name=CURRENT_VERSION::${current_version}
echo ::set-output name=PRERELEASE_VERSION::${prerelease_version}
echo ::set-output name=RELEASE_VERSION::${release_version}
echo "current version: ${current_version}"
echo "prerelease version: ${prerelease_version}"
echo "release version: ${release_version}"
- name: generate change log for release
run: |
git-chglog --next-tag "v${{ steps.get_version.outputs.RELEASE_VERSION }}" > CHANGELOG.md
- name: Add updated changelog
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: "chore(release): v${{ steps.get_version.outputs.RELEASE_VERSION }}"
add: "CHANGELOG.md"