Skip to content

Commit

Permalink
👷 Update release CI
Browse files Browse the repository at this point in the history
  • Loading branch information
noraincode committed Mar 5, 2024
1 parent a7ff1ce commit fe34f25
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_dispatch:
inputs:
release-type:
description: "Release type (one of): patch, minor, major, prepatch, preminor, premajor, prerelease"
description: "Release type (one of): patch, minor, major"
required: true

permissions: write-all
Expand Down Expand Up @@ -38,30 +38,25 @@ jobs:
# Bump package version
# Use tag latest
- name: Bump release version
if: startsWith(github.event.inputs.release-type, 'pre') != true
run: |
echo "NEW_VERSION=$(npm --no-git-tag-version version $RELEASE_TYPE)" >> $GITHUB_ENV
echo "RELEASE_TAG=latest" >> $GITHUB_ENV
env:
RELEASE_TYPE: ${{ github.event.inputs.release-type }}

# Bump package pre-release version
# Use tag beta for pre-release versions
- name: Bump pre-release version
if: startsWith(github.event.inputs.release-type, 'pre')
- name: Debug
run: |
echo "NEW_VERSION=$(npm --no-git-tag-version --preid=beta version $RELEASE_TYPE
echo "RELEASE_TAG=beta" >> $GITHUB_ENV
env:
RELEASE_TYPE: ${{ github.event.inputs.release-type }}
echo "NEW_VERSION: $NEW_VERSION"
echo "RELEASE_TAG: $RELEASE_TAG"
# Update changelog unreleased section with new version
- name: Update changelog
uses: superfaceai/release-changelog-action@v1
uses: superfaceai/release-changelog-action@v2
with:
path-to-changelog: CHANGELOG.md
version: ${{ env.NEW_VERSION }}
operation: release
format: markdownlint

# Commit changes
- name: Commit CHANGELOG.md and package.json changes and create tag
Expand Down

0 comments on commit fe34f25

Please sign in to comment.