Create Release #9
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
| name: Create Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| shimmy_version: | |
| description: "Shimmy version to release (e.g. v0.0.6). Leave blank to use the latest shimmy release." | |
| required: false | |
| type: string | |
| trigger_builds: | |
| description: "Also trigger image builds (python, wolfram, lean, scratch) after the release is created" | |
| required: false | |
| default: false | |
| type: boolean | |
| jobs: | |
| release: | |
| name: Create GitHub Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| actions: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Resolve shimmy version | |
| id: shimmy | |
| env: | |
| SHIMMY_VERSION: ${{ inputs.shimmy_version }} | |
| run: | | |
| if [ -z "$SHIMMY_VERSION" ]; then | |
| SHIMMY_VERSION=$(curl -sL \ | |
| -H "Accept: application/vnd.github+json" \ | |
| https://api.github.com/repos/lambda-feedback/shimmy/releases/latest \ | |
| | jq -r .tag_name) | |
| fi | |
| echo "version=$SHIMMY_VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.shimmy.outputs.version }} | |
| name: "Shimmy ${{ steps.shimmy.outputs.version }}" | |
| generate_release_notes: true | |
| - name: Trigger image builds | |
| if: ${{ inputs.trigger_builds }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| for workflow in build_python.yml build_wolfram.yml build_lean.yml build_scratch.yml; do | |
| gh workflow run "$workflow" --ref "${{ github.ref_name }}" | |
| done |