Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Move release handling to GH cli #3075

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

ann0see
Copy link
Member

@ann0see ann0see commented May 28, 2023

Short description of changes

Makes more use of native gh command to get rid of third party actions. This has the benefit of less complexity and the need of trust on external dependencies.

CHANGELOG: Internal: Use native gh command for release management and uploading artefacts

Context: Fixes an issue?

Related to: #3069

Does this change need documentation? What needs to be documented and how?
No

Status of this Pull Request
Ready for review. Tested Prerelease and release on my repo. We should decide if the current way of uploading two files on the linux build is ok or two steps/moving the whole upload logic into the autobuild scripts is preferred. This would add more complex logic.

What is missing until this pull request can be merged?
Agreement on how to handle multiple artefacts.

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

@@ -100,10 +100,10 @@ build_app_as_apk() {
}

pass_artifact_to_job() {
mkdir deploy
mkdir publish
local artifact="jamulus_${JAMULUS_BUILD_VERSION}_android.apk"
Copy link
Member Author

Choose a reason for hiding this comment

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

uploading everything from the deploy directory doesn’t work as

  1. GH on Windows doesn‘t support wildcards
  2. MacOS moves the binary (.app files) to the deploy folder

If instead we upload the files by name - as we do in this state - we could also use the deploy directory directly.

id: upload-release-asset2
uses: actions/upload-release-asset@v1
id: upload-release-assets
run: cd publish; gh release upload "${{ needs.create_release.outputs.tag_name }}" ${{ steps.get-artifacts.outputs.artifact_1 }} ${{ steps.get-artifacts.outputs.artifact_2 }} --clobber
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure if omitting quotes is the best way to "overload" this command. Basically if quotes are omitted we can have an arbitrary amount of files to upload

@ann0see ann0see force-pushed the autobuild/UseGHCommand branch 3 times, most recently from b809c8c to 7ee2ca4 Compare May 30, 2023 20:27
@gilgongo gilgongo added this to Triage in Tracking (old) via automation May 30, 2023
@gilgongo gilgongo moved this from Triage to Waiting on Team in Tracking (old) May 30, 2023
@pljones pljones added the tooling Changes to the automated build system label May 31, 2023
@pljones pljones added this to the Release 3.10.0 milestone Jul 2, 2023
@ann0see
Copy link
Member Author

ann0see commented Jul 12, 2023

I've now hard-coded the repo files. Hopefully that will work now.

ann0see

This comment was marked as off-topic.

@ann0see ann0see merged commit e432d82 into jamulussoftware:main Jul 13, 2023
12 checks passed
@ann0see ann0see deleted the autobuild/UseGHCommand branch July 13, 2023 21:06
@ann0see
Copy link
Member Author

ann0see commented Jul 13, 2023

I've removed the release upload and release create and delete actions now from the actions whitelist as they're no longer used.

@pljones pljones removed this from Waiting on Team in Tracking (old) Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Changes to the automated build system
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants