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

Fix: uploading of GRFcodec releases #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rubidium42
Copy link
Contributor

It would be preferable to just have GRFcodec releases at the "old" location, but the upload part has been lost when migrating to GitHub. This is a counterpart to OpenTTD/website#319, where this would be the better solution.

I copied bits from OpenTTD's code but I have no idea how to test this as I do not have access to any of the secrets required for uploading.

I hope @TrueBrain or @glx22 might be able to test whether this actually uploads and especially whether it uploads it to the right location. The right location being https://www.openttd.org/downloads/grfcodec-releases/latest for releases and https://www.openttd.org/downloads/grfcodec-nightlies/latest for the nightlies. Otherwise it'll be a lot of YOLO testing in production with nightlies I fear.

@TrueBrain
Copy link
Member

A copy/paste should be fine, yes. So this looks good on first sight. There are two things we do need to take care of:

      CDN_SIGNING_KEY: ${{ secrets.CDN_SIGNING_KEY }}
      DEPLOYMENT_APP_ID: ${{ secrets.DEPLOYMENT_APP_ID }}
      DEPLOYMENT_APP_PRIVATE_KEY: ${{ secrets.DEPLOYMENT_APP_PRIVATE_KEY }}

These are the three secrets this change needs. The last two are easy, as they are the same for all OpenTTD repository. The first one however, is a bit more tricky. I need to add somewhere that this repo has access to upload to the above mentioned folders. I am not completely sure anymore where I had to do that .. I will check that out later this week. If I forget, poke me.

with:
version: ${{ needs.source.outputs.version }}
folder: ${{ needs.source.outputs.folder }}
trigger_type: ${{ needs.source.outputs.trigger_type }}
Copy link
Member

Choose a reason for hiding this comment

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

From what I can tell, the source job in this workflow doesn't define either of those three. For reference:

https://github.com/OpenTTD/OpenTTD/blob/master/.github/workflows/release-source.yml#L145

It isn't completely trivial to create the right variables, as it needs to detect whether it is a nightly or release.


steps:
- name: Download all bundles
uses: actions/download-artifact@v4
Copy link
Contributor

@glx22 glx22 Sep 16, 2024

Choose a reason for hiding this comment

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

I don't think we have any artifacts as gh is used to directly upload bundles in the release assets.

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.

3 participants