Skip to content

Commit

Permalink
fix(ci): workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
bsmithcompsci committed Oct 29, 2024
1 parent 1daf301 commit 821d68a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/addon-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ name: Build and Release Addon
on:
workflow_dispatch:
pull_request:
push:
tags:
- '**'
release:
types: [published, created, edited, deleted, prereleased, released]

jobs:
build:
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/untagged.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,22 @@ jobs:
git push origin HEAD:${{ github.ref }}
# Create a new tag for the release
git tag -a "v$NEW_VERSION" -m "Release version $NEW_VERSION" -m "$$CHANGELOG_NEWLINES"
git push origin "v$NEW_VERSION"
git push origin "v$NEW_VERSION"
- name: Create Release Draft
if: ${{ steps.get_version.outputs.nextRelease != '' }}
env:
NEXT_RELEASE: ${{ steps.get_version.outputs.nextRelease }}
run: |
# Extract the next version and changelog notes from the output
NEW_VERSION=$(echo $NEXT_RELEASE | jq -r '.version')
CHANGELOG=$(echo $NEXT_RELEASE | jq -r '.notes')
# Update the Changelog to handle the new lines.
CHANGELOG_NEWLINES=$(echo -e "$CHANGELOG")
# Create the release draft
echo "Creating release draft for v$NEW_VERSION"
echo "Changelog: $CHANGELOG"
echo "Changelog with newlines: $CHANGELOG_NEWLINES"
gh release create "v$NEW_VERSION" --title "v$NEW_VERSION" --notes "$CHANGELOG_NEWLINES" --draft

0 comments on commit 821d68a

Please sign in to comment.