name: Release on: push: branches: - main # or whatever branch you want to use jobs: release: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v2 - name: Check for changes in package.json run: | git diff --cached --diff-filter=d package.json || { echo "No changes to package.json" exit 1 } - name: Get version number from package.json id: get_version run: | VERSION=$(jq -r '.version' package.json) echo "::set-output name=version::$VERSION" - name: Extract latest CHANGELOG entry id: changelog run: | CHANGELOG_CONTENT=$(awk '/^## \[/{n++} n==1' CHANGELOG.md) echo "CHANGELOG_CONTENT<