Bump node-fetch from 2.6.13 to 2.7.0 (#270) #96
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
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 }} |