Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinAbro321 committed Mar 13, 2024
1 parent e81a8ee commit 0c270a9
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tag Package
name: Release Package

on:
workflow_dispatch:
Expand All @@ -11,7 +11,7 @@ on:
required: true

jobs:
tag:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -30,19 +30,17 @@ jobs:
- name: Validate tag
run: |
SEMVER_REGEX="^v[0-9]+\.[0-9]+\.[0-9]+$"
if ! [[ $VERSION =~ $SEMVER_REGEX ]]; then
echo "Error: Version $VERSION does not match the semver pattern (vMAJOR.MINOR.PATCH)."
if ! [[ ${{ github.event.inputs.version }} =~ $SEMVER_REGEX ]]; then
echo "Error: Version ${{ github.event.inputs.version }} does not match the semver pattern (vMAJOR.MINOR.PATCH)."
exit 1
fi
- name: generate release notes
run: git cliff --unreleased --include-path "${{ github.event.inputs.packageName }}/*" > notes.txt

- name: Tag
- name: Release
run: |
PACKAGE_NAME=${{ github.event.inputs.packageName }}
VERSION=${{ github.event.inputs.version }}
gh release create $PACKAGE_NAME/$VERSION --notes-file notes.txt
gh release create ${{ github.event.inputs.packageName }}/${{ github.event.inputs.version }} --notes-file notes.txt
# Could add a release step with git cliff
# https://git-cliff.org/docs/integration/github
Expand Down

0 comments on commit 0c270a9

Please sign in to comment.