Make Release #1
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: Make Release | |
| # Tag-only release: creates a semver tag (v<maj>.<min>.<pat>) so that plugin | |
| # managers can pin a specific version instead of following master or a commit. | |
| # Plugin managers check out the tag via git, so the release has no binary | |
| # artifacts: the tag is protected by the releases-official ruleset | |
| # (ci/ruleset-official.json), which restricts tag creation, update and | |
| # deletion to the release workflow's deploy key. | |
| # | |
| # The version is bumped on master by scripts/release.sh (version PR). After | |
| # the PR is merged, run this workflow: first with dry_run: true to validate, | |
| # then with dry_run: false to release. | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| commit: | |
| description: 'Commit SHA to release (empty = branch HEAD)' | |
| required: false | |
| default: '' | |
| type: string | |
| dry_run: | |
| description: 'Dry run - validate without creating the tag' | |
| required: true | |
| type: boolean | |
| default: true | |
| permissions: | |
| contents: write # for creating tag and release | |
| jobs: | |
| make-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| with: | |
| ssh-key: ${{ secrets.DEPLOY_KEY_RELEASE }} | |
| ref: ${{ inputs.commit != '' && inputs.commit || github.ref_name }} | |
| fetch-depth: 0 | |
| - name: Run release checks | |
| id: checks | |
| run: bash scripts/make-release-checks.sh | |
| - name: Create release tag | |
| if: ${{ github.event.inputs.dry_run == 'false' }} | |
| run: | | |
| VERSION="${{ steps.checks.outputs.version }}" | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag -a "${VERSION}" -m "Release ${VERSION}" | |
| git push origin "${VERSION}" | |
| echo "Created and pushed tag ${VERSION}" | |
| - name: Generate release description | |
| id: desc | |
| run: bash scripts/make-release-desc.sh "${{ steps.checks.outputs.version }}" | |
| - name: Create release | |
| if: ${{ github.event.inputs.dry_run == 'false' }} | |
| uses: ggml-org/action-create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| tag_name: ${{ steps.checks.outputs.version }} | |
| prerelease: false | |
| # TODO: enrich the body of the release with more information | |
| body: | | |
| ## Overview | |
| New version has been released. | |
| **More info:** [dist : releases and versioning of ggml-org projects](https://github.com/ggml-org/ggml/discussions/1579) | |
| ## ${{ steps.desc.outputs.changelog_title }} | |
| ${{ steps.desc.outputs.changelog }} | |
| - name: Dry run summary | |
| if: ${{ github.event.inputs.dry_run == 'true' }} | |
| run: | | |
| echo "Dry run complete - all checks passed." | |
| echo "Would have created tag: ${{ steps.checks.outputs.version }}" |