Skip to content

feat: add confirmation view endpoint types (#163) #116

feat: add confirmation view endpoint types (#163)

feat: add confirmation view endpoint types (#163) #116

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Extract version
id: version
run: |
OLD_VERSION=$(git describe --tags --abbrev=0)
NEW_VERSION=v$(node -p 'require("./package.json").version')
if [ $NEW_VERSION != $OLD_VERSION ]; then
echo "New version $NEW_VERSION detected"
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
git log "$OLD_VERSION"..HEAD --pretty=format:"* %s" > CHANGELOG.md
else
echo "Version $OLD_VERSION hasn't changed, skipping the release"
exit 1
fi
- name: Create a git tag
if: success()
run: git tag $NEW_VERSION && git push --tags
env:
NEW_VERSION: ${{ steps.version.outputs.version }}
- name: GitHub release
if: success()
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ steps.version.outputs.version }}
tag_name: ${{ steps.version.outputs.version }}
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ github.token }}