Skip to content

Update to node20 and update eslint (#279) #103

Update to node20 and update eslint (#279)

Update to node20 and update eslint (#279) #103

Workflow file for this run

name: "Release Workflow"
on:
push:
branches:
- 'releases/v1.6'
- 'releases/v2.3'
- 'releases/v3.3.0'
- 'main'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: read versions
id: read-version
run: |
echo "version=$(jq -r ".version" package.json)" >> $GITHUB_OUTPUT
echo "tag=v$(jq -r ".version" package.json)" >> $GITHUB_OUTPUT
echo "major_tag=v$(jq -r ".version" package.json | cut -d '.' -f 1)" >> $GITHUB_OUTPUT
- name: read changelog entry for version
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: "${{ steps.read-version.outputs.tag }}"
path: ./CHANGELOG.md
- name: check for existing release
id: check_release
run: |
TAG=$(git ls-remote --tags origin | grep ${{ steps.read-version.outputs.tag }} | cat)
MISSING=$([[ -z "$TAG" ]] && echo 'true' || echo 'false')
echo "missing=$MISSING" >> $GITHUB_OUTPUT
- name: create release
if: ${{ steps.check_release.outputs.missing == 'true' }}
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "${{ steps.read-version.outputs.tag }}"
release_name: Changelog Enforcer ${{ steps.read-version.outputs.version }}
body: ${{ steps.changelog_reader.outputs.changes }}
draft: false
prerelease: false
- name: update major version tag
if: ${{ steps.check_release.outputs.missing == 'true' }}
uses: richardsimko/update-tag@v1
with:
tag_name: "${{ steps.read-version.outputs.major_tag }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}