Skip to content

release.yml: Use the dmd-revision from the build to create releases#22686

Merged
kinke merged 1 commit intodlang:masterfrom
ibuclaw:release_commit
Mar 3, 2026
Merged

release.yml: Use the dmd-revision from the build to create releases#22686
kinke merged 1 commit intodlang:masterfrom
ibuclaw:release_commit

Conversation

@ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Mar 3, 2026

When creating a new release where the "branch" to build from is the same as the tag, the release-action step fails because it expects the argument to either be a SHA or branch name.

Run ncipollo/release-action@v1
  with:
    token: ***
    name: DMD v2.112.1-rc.1
    prerelease: true
    body: Release of the reference D compiler
  
  | Component | Revision                                                         |
  | --------- | ---------------------------------------------------------------- |
  | DMD       | dlang/dmd@6bb9fd7d3b32539ffe1c6d4add6988a4c72460c6           |
  | Phobos    | dlang/phobos@12eb40b29556e210bf88c2bf08152ab0f27687ba     |
  
    artifacts: /home/runner/artifacts/*
    artifactErrorsFailBuild: true
    tag: v2.112.1-rc.1
    commit: v2.112.1-rc.1
    generateReleaseNotes: false
    immutableCreate: false
    makeLatest: legacy
    omitBody: false
    omitBodyDuringUpdate: false
    omitDraftDuringUpdate: false
    omitName: false
    omitNameDuringUpdate: false
    omitPrereleaseDuringUpdate: false
    removeArtifacts: false
    replacesArtifacts: true
    skipIfReleaseExists: false
    updateOnlyUnreleased: false
Error: Error 422: Validation Failed: {"resource":"Release","code":"invalid","field":"target_commitish"} - https://docs.github.com/rest/releases/releases#create-a-release

@ibuclaw ibuclaw requested a review from dkorpel March 3, 2026 14:30
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#22686"

Comment on lines 79 to +90
body: |
Release of the reference D compiler

| Component | Revision |
| --------- | ---------------------------------------------------------------- |
| DMD | dlang/dmd@${{ needs.build-all-releases.outputs.dmd-revision }} |
| Phobos | dlang/phobos@${{ needs.build-all-releases.outputs.phobos-revision }} |

artifacts: ${{ steps.list-artifacts.outputs.artifacts_directory }}/*
artifactErrorsFailBuild: true
tag: ${{ github.event.inputs.tag }}
commit: ${{ github.event.inputs.branch }}
commit: ${{ needs.build-all-releases.outputs.dmd-revision }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable is taken from the body above, so we know it has a non-empty value.

@kinke kinke merged commit 710fcf3 into dlang:master Mar 3, 2026
38 of 42 checks passed
@ibuclaw ibuclaw deleted the release_commit branch March 3, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants