# Copyright 2023 BentoML Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. name: release-notes on: workflow_dispatch: inputs: tags: description: 'Tag for releases' required: true type: string workflow_call: inputs: tags: required: true type: string env: HATCH_VERBOSE: 2 defaults: run: shell: bash --noprofile --norc -exo pipefail {0} jobs: gen-release-notes: if: github.repository_owner == 'bentoml' runs-on: ubuntu-latest permissions: contents: write id-token: write steps: - uses: actions/checkout@v3 with: fetch-depth: 0 ref: '${{ inputs.tags }}' - name: Setup CI uses: ./.github/actions/setup-repo with: python-version: '3.11' - name: Create release notes run: ./.github/actions/create_release_and_archive.sh ${{ inputs.tags }} - name: Download Python artifacts uses: actions/download-artifact@v3 with: name: python-artifacts path: dist - name: Download binaries uses: actions/download-artifact@v3 with: name: standalone path: archives - name: Download standalone MacOS uses: actions/download-artifact@v3 with: name: staged-MacOS path: archives - name: Download installers uses: actions/download-artifact@v3 with: name: installers path: installers - name: Create release uses: softprops/action-gh-release@v1 with: # Use GH feature to populate the changelog automatically generate_release_notes: true body_path: release_notes.txt fail_on_unmatched_files: true tag_name: '${{ inputs.tags }}' files: |- dist/* archives/* installers/*