Skip to content

Commit

Permalink
[CI] Add option to attach release notes automatically (mlrun#2966)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tankilevitch authored Jan 21, 2023
1 parent f73cf16 commit 9a07225
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 97 deletions.
95 changes: 0 additions & 95 deletions .github/workflows/automatic-release.yaml

This file was deleted.

20 changes: 18 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,31 @@ jobs:
needs: create-releases
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r automation/requirements.txt -r dev-requirements.txt && pip install -e .
- name: Generate release notes
id: release-notes
run: |
- echo "body=$(make release-notes MLRUN_OLD_VERSION=v${{ github.event.inputs.previous_version }} MLRUN_NEW_VERSION=v${{ github.event.inputs.version }} MLRUN_RELEASE_BRANCH=${{ github.ref_name }} MLRUN_RAISE_ON_ERROR=false MLRUN_RELEASE_NOTES_OUTPUT_FILE=release_notes.md || cat release_notes.md)" >> $GITHUB_OUTPUT
make release-notes MLRUN_OLD_VERSION=v${{ github.event.inputs.previous_version }} MLRUN_VERSION=v${{ github.event.inputs.version }} MLRUN_RELEASE_BRANCH=${{ github.ref_name }} MLRUN_RAISE_ON_ERROR=false MLRUN_RELEASE_NOTES_OUTPUT_FILE=release_notes.md MLRUN_SKIP_CLONE=true
- name: resolve release notes
id: resolve-release-notes
run: |
echo "body<<EOF" >> $GITHUB_OUTPUT
cat release_notes.md >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- uses: ncipollo/release-action@v1
with:
tag: v${{ github.event.inputs.version }}
commit: ${{ github.ref_name }}
token: ${{ secrets.RELEASE_GITHUB_ACCESS_TOKEN }}
allowUpdates: true
prerelease: ${{ github.event.inputs.pre_release }}
body: ${{ steps.release-notes.outputs.body }}
body: ${{ steps.resolve-release-notes.outputs.body }}

0 comments on commit 9a07225

Please sign in to comment.