Skip to content

Release Workflow#71

Merged
Cod-e-Codes merged 4 commits intoCod-e-Codes:mainfrom
alexandzors:alexandzors/release-workflow
Feb 16, 2026
Merged

Release Workflow#71
Cod-e-Codes merged 4 commits intoCod-e-Codes:mainfrom
alexandzors:alexandzors/release-workflow

Conversation

@alexandzors
Copy link
Contributor

@alexandzors alexandzors commented Feb 16, 2026

Pull Request

Description

This PR sets up a new Actions workflow to auto build the following architectures and uploads them to the triggering release.

  • Darwin: amd64/arm64
  • Windows: amd64
  • Linux: amd64/arm64

It utilizes Matrix building for parallel builds for quicker build times. It also builds and pushes the docker image after the binary release has completed. As well as auto appending the docker image pulling info to the release body.

Currently the workflow supports workflow_dispatch for manually running, however, it does not auto cleanup artifacts if manually run. That way debugging can still happen if needed.

Wanted to test this on my M4 Air and noticed you did not have a build for arm64 Darwin. Hopefully this helps! :)

Fixes # (issue)

N/A

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe): No code changes, adds a workflow for releases.

Checklist

  • My code builds and passes all tests/CI
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated documentation as needed
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have assigned reviewers

Additional context

image

Test release on my fork: https://github.com/alexandzors/marchat/releases/tag/0.0.5
Action run: https://github.com/alexandzors/marchat/actions/runs/22046690811

@Cod-e-Codes
Copy link
Owner

Thanks for putting this together. The overall approach is solid and I'd like to get this merged, but there are several issues that need to be fixed first. Note that your test run was cancelled before the Docker job ran, so some of these were never exercised end-to-end.

Bugs:

  1. Archive format mismatch. The workflow creates .tar.gz for non-Windows platforms, but both install.ps1 and install.sh expect .zip for all platforms. This will break the install scripts. Either use .zip across the board or update both install scripts to handle .tar.gz.

  2. Docker info appended twice. The upload-assets job appends Docker pull instructions to the release body before the image is even built, and the docker job appends the same block again after pushing. In your test release only one copy appeared because you cancelled before the Docker job ran. Remove the Docker body from upload-assets and only append it in the docker job after the push succeeds.

  3. Delete artifact step references matrix.platform but upload-assets is not a matrix job. That variable doesn't exist in this context. The actual artifact names from the build job are marchat-{platform} (e.g. marchat-linux-amd64), not marchat-{VERSION}-{platform}, so the name pattern needs to be corrected.

  4. docker job is missing permissions: contents: write. It uses softprops/action-gh-release to update the release body but only upload-assets declares that permission. The docker job will get a 403.

Other considerations:

  1. The if: ${{ github.event.release.prerelease == false }} gate means prerelease publications won't trigger builds. My current versions are all betas (v0.9.0-beta.4), so this would need to be removed or adjusted.

  2. For supply chain security, consider pinning third-party actions (softprops/action-gh-release, geekyeggo/delete-artifact) to commit SHAs instead of version tags.

@alexandzors
Copy link
Contributor Author

alexandzors commented Feb 16, 2026

Thanks for putting this together. The overall approach is solid and I'd like to get this merged, but there are several issues that need to be fixed first. Note that your test run was cancelled before the Docker job ran, so some of these were never exercised end-to-end.

In my haste to build the arm64 build I left out the docker stuff and cancelled the docker build on my final release testing. In hindsight that was overly sloppy of me. Sorry about that!

Archive format mismatch. The workflow creates .tar.gz for non-Windows platforms, but both install.ps1 and install.sh expect .zip for all platforms. This will break the install scripts. Either use .zip across the board or update both install scripts to handle .tar.gz.

Sounds good. I'll update everything to use .zip

Docker info appended twice. The upload-assets job appends Docker pull instructions to the release body before the image is even built, and the docker job appends the same block again after pushing. In your test release only one copy appeared because you cancelled before the Docker job ran. Remove the Docker body from upload-assets and only append it in the docker job after the push succeeds.

🤦 not sure how that one snuck through to the PR. I had removed it locally and thought I had included it in the commit: 920b73a

Delete artifact step references matrix.platform but upload-assets is not a matrix job. That variable doesn't exist in this context. The actual artifact names from the build job are marchat-{platform} (e.g. marchat-linux-amd64), not marchat-{VERSION}-{platform}, so the name pattern needs to be corrected.

🤦

docker job is missing permissions: contents: write. It uses softprops/action-gh-release to update the release body but only upload-assets declares that permission. The docker job will get a 403.

Good catch! The change for the body append was a last second before PR. Completely forgot about the write permission also needed to be added..

The if: ${{ github.event.release.prerelease == false }} gate means prerelease publications won't trigger builds. My current versions are all betas (v0.9.0-beta.4), so this would need to be removed or adjusted.

Did not consider that. I had that in there as currently your releases are tagged as latest so figured you were not using the pre-release. Unless you are converting pre-releases to a full release? I am used to the pre-release are only betas and then a full release gets created when everything is ready flow. :)

For supply chain security, consider pinning third-party actions (softprops/action-gh-release, geekyeggo/delete-artifact) to commit SHAs instead of version tags.

Good call! Updated.

ty for the thorough review! Hopefully this push is a bit better. Also the docker action has run and you can find my fork release here: https://hub.docker.com/r/alexandzors/marchat -- release: https://github.com/alexandzors/marchat/releases/tag/0.0.7 -- action run: https://github.com/alexandzors/marchat/actions/runs/22050847191

@Cod-e-Codes Cod-e-Codes merged commit cf50bab into Cod-e-Codes:main Feb 16, 2026
1 check passed
@Cod-e-Codes
Copy link
Owner

Looks good, thanks for the contribution

@Cod-e-Codes
Copy link
Owner

Just published v0.9.0-beta.5 and the workflow ran perfectly. darwin-arm64 build is up: https://github.com/Cod-e-Codes/marchat/releases/tag/v0.9.0-beta.5

@alexandzors
Copy link
Contributor Author

Just published v0.9.0-beta.5 and the workflow ran perfectly. darwin-arm64 build is up: https://github.com/Cod-e-Codes/marchat/releases/tag/v0.9.0-beta.5

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments