LuxCore Python Wheels Releaser #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: 2024 Howetuft | |
| # | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: LuxCore Python Wheels Releaser | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| release-tag: | |
| description: "Tag for the release" | |
| required: True | |
| default: v0.0.1 | |
| type: string | |
| release-name: | |
| description: "Release name" | |
| required: False | |
| default: Test | |
| type: string | |
| luxcore-ref: | |
| description: "LuxCore ref to checkout for build" | |
| required: True | |
| default: for_v2.10 | |
| type: string | |
| allow-updates: | |
| description: "Update existing release (if any)" | |
| required: True | |
| type: boolean | |
| default: True | |
| prerelease: | |
| description: "Prerelease" | |
| required: True | |
| type: boolean | |
| default: True | |
| rebuild-all: | |
| description: "Rebuild all" | |
| required: True | |
| type: boolean | |
| default: False | |
| jobs: | |
| # Reminder: don't forget to update call-build-wheels commit version if you | |
| # upgrade LuxCoreRender/LuxCore/.github/workflows/wheels.yml, otherwise | |
| # your modifications won't be taken into account | |
| call-build-wheels: | |
| name: 'Build wheels' | |
| uses: LuxCoreRender/LuxCore/.github/workflows/wheels.yml@cbbdcbcd4119a981b36599a362c8792bdb7f0711 | |
| with: | |
| repository: LuxCoreRender/LuxCore | |
| ref: ${{ inputs.luxcore-ref }} | |
| create-release: | |
| name: 'Create release' | |
| if: github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| needs: [call-build-wheels] | |
| permissions: | |
| id-token: write | |
| attestations: write | |
| contents: write | |
| steps: | |
| - run: | | |
| echo "Creating release '${{ inputs.release-version }}'" | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: cibw-wheels-* | |
| path: ${{ github.workspace }}/dist | |
| merge-multiple: false | |
| - name: Display structure of downloaded files | |
| run: ls -Rl ${{ github.workspace }}/dist | |
| - name: Re-zip artifacts | |
| working-directory: ${{ github.workspace }}/dist | |
| run: | | |
| mkdir ../artifacts | |
| for d in */ ; do | |
| d2=${d%/} | |
| echo "zip ${d2}" | |
| zip -j ../artifacts/${d2}.zip ${d2}/* | |
| done | |
| - id: make-release | |
| # Use full length commit SHA, otherwise CodeQL complains... | |
| uses: ncipollo/release-action@cdcc88a9acf3ca41c16c37bb7d21b9ad48560d87 | |
| with: | |
| name: ${{ inputs.release-name }} | |
| tag: ${{ inputs.release-tag }} | |
| artifacts: artifacts/* | |
| removeArtifacts: true | |
| allowUpdates: ${{ inputs.allow-updates }} | |
| prerelease: ${{ inputs.prerelease }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| updateOnlyUnreleased: true | |
| draft: true | |
| body: | | |
| ## LuxCore Python Wheels | |
| This release is built from the following point in LuxCoreRender/LuxCore: | |
| - Branch: ${{ needs.call-build-wheels.outputs.branch }} | |
| - Commit: ${{ needs.call-build-wheels.outputs.commit }} | |
| Attestations: | |
| ${{ needs.call-build-wheels.outputs.attestation-url }} | |
| - run: | | |
| echo "### Release""" >> $GITHUB_STEP_SUMMARY | |
| echo ${{ steps.make-release.outputs.html_url }} >> $GITHUB_STEP_SUMMARY | |