Skip to content

fix: change the connectivity message (RC) (#2102) #46

fix: change the connectivity message (RC) (#2102)

fix: change the connectivity message (RC) (#2102) #46

name: 'Generate Changelog'
on:
workflow_dispatch:
inputs:
current-release-tag:
type: string
description: 'The tag of the current release starting with v'
required: false
default: ''
push:
tags:
- 'v*'
jobs:
Changelog:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Git repository with history for all branches and tags'
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive # Needed in order to fetch Kalium sources for building
- name: 'Set current Git tag from input'
env:
INPUT_RELEASE_TAG: ${{github.event.inputs.current-release-tag}}
if: "${{ github.event.inputs.current-release-tag != '' }}"
run: echo "CURRENT_TAG=$INPUT_RELEASE_TAG" >> "$GITHUB_ENV"
- name: 'Set current Git tag from commit'
if: "${{ github.event.inputs.current-release-tag == '' }}"
run: echo "CURRENT_TAG=$(git tag --points-at ${{github.sha}})" >> "$GITHUB_ENV"
- name: 'Set previous Git tag from commit'
run: echo "PREVIOUS_TAG=$(git tag | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(\+|$)' | tail -n 2 | head -n 1)" >> "$GITHUB_ENV"
- name: 'Print environment variables'
run: |
echo -e "PREVIOUS_TAG = $PREVIOUS_TAG"
echo -e "CURRENT_TAG = $CURRENT_TAG"
echo -e "Node.js version = $(node --version)"
- name: 'Generate changelog'
run: |
echo "{}" > ./package.json
npx [email protected] -t "$PREVIOUS_TAG...$CURRENT_TAG"
- name: 'Attach changelog to tag'
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{github.token}}
with:
tag_name: ${{env.CURRENT_TAG}}
name: ${{env.CURRENT_TAG}}
body_path: ./CHANGELOG.md
draft: false
prerelease: false