Skip to content

Commit

Permalink
fixing bugs (#3114)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcdurak authored Oct 21, 2024
1 parent 36ed1c3 commit b2f9426
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release_finalize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches: [misc/prepare-release-*]
env:
ZENML_ANALYTICS_OPT_IN: false
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
fetch-versions:
if: github.repository == 'zenml-io/zenml'
Expand Down Expand Up @@ -35,8 +36,6 @@ jobs:
git config --global user.name "ZenML GmbH"
# Extract the old version
- name: Fetch the old version
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: old-version
run: |
LATEST_RELEASE=$(gh release view --json tagName,publishedAt -q '{tag: .tagName, date: .publishedAt}')
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/release_prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches: [misc/prepare-release-*]
env:
ZENML_ANALYTICS_OPT_IN: false
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
fetch-versions:
if: github.repository == 'zenml-io/zenml'
Expand Down Expand Up @@ -35,8 +36,6 @@ jobs:
git config --global user.name "ZenML GmbH"
# Extract the old version
- name: Fetch the old version
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: old-version
run: |
LATEST_RELEASE=$(gh release view --json tagName,publishedAt -q '{tag: .tagName, date: .publishedAt}')
Expand All @@ -57,8 +56,6 @@ jobs:
git config --global user.name "ZenML GmbH"
# Validate the new version
- name: Validate new version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
scripts/validate-new-version.sh ${{ needs.fetch-versions.outputs.new_version }}
Expand Down Expand Up @@ -103,11 +100,17 @@ jobs:
git add examples/quickstart
# Generate and append release notes
- name: Generate release notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
RELEASE_NOTES=$(gh api repos/${{ github.repository }}/releases/generate-notes -F tag_name=${{ needs.fetch-versions.outputs.new_version }} -F target_commitish=${{ github.sha }} -F previous_tag_name=${{ needs.fetch-versions.outputs.old_version }} | jq -r '.body')
echo "$RELEASE_NOTES" >> RELEASE_NOTES.md
{
head -n 1 RELEASE_NOTES.md
echo ""
echo "# ${{ needs.fetch-versions.outputs.new_version }}"
echo ""
echo "$RELEASE_NOTES"
echo ""
tail -n +2 RELEASE_NOTES.md
} > RELEASE_NOTES.md.new && mv RELEASE_NOTES.md.new RELEASE_NOTES.md
git add RELEASE_NOTES.md
# Push the changes
- name: Push the changes
Expand All @@ -119,8 +122,7 @@ jobs:
run: |
gh pr create --base "develop" --head "${{ github.ref }}" \
--title "Prepare release ${{ needs.fetch-versions.outputs.new_version }}" \
--body "This PR prepares the release of version ${{ needs.fetch-versions.outputs.new_version }}."
--body "This PR prepares the release of version ${{ needs.fetch-versions.outputs.new_version }}."
# Send a message to Discord to alert everyone for the release
- name: Send message to Discord
run: |
Expand Down

0 comments on commit b2f9426

Please sign in to comment.