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

Improve github-actions activation documentation #46

Open
GabLeRoux opened this issue Oct 7, 2020 · 10 comments
Open

Improve github-actions activation documentation #46

GabLeRoux opened this issue Oct 7, 2020 · 10 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers hacktoberfest https://hacktoberfest.digitalocean.com/

Comments

@GabLeRoux
Copy link
Member

Is your feature request related to a problem? Please describe.
I feel like splitting the steps outside of the file makes it a bit confusing to know where to place these steps when you're starting with Github Actions.

Describe the solution you'd like

See section with a blue square in the following picture:

image

Combining examples into a single file would make it easier to go through the activation process and may reduce confusion about where to place the content.

Describe alternatives you've considered

  • It would also be nice to be able to download that file, but this is definitely optional.

This issue may also serve as a place to suggest ideas to make it easier to go through activation process.

@GabLeRoux GabLeRoux added the documentation Improvements or additions to documentation label Oct 7, 2020
@GabLeRoux
Copy link
Member Author

Another suggestion:

Show where to download the generated artifact with a screenshot
Here's a screenshot we could use:
image

@GabLeRoux GabLeRoux added good first issue Good for newcomers hacktoberfest https://hacktoberfest.digitalocean.com/ labels Oct 7, 2020
@GabLeRoux
Copy link
Member Author

Also, I feel like title size is not enough to differentiate the Personal license and Professional license. Only size may not be enough:

  • There could be a link in the first paragraph to point to the right sections.
  • There could also be entries in the sidebar to jump from one section or the other. (This would involve a bit more work).

Consider these as suggestions and can definitely be done in a different issue.

@GabLeRoux
Copy link
Member Author

Another suggestion:
I think the request activation steps could even benefit from a manual trigger so the code could be always kept in the repository, but only executed manually. More details here:
https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/

@GabLeRoux
Copy link
Member Author

GabLeRoux commented Oct 7, 2020

Concerning above comment with manual trigger, here's an improved activation.yml which implements the above and can be used to activate any unity version (based on user input). It can be manually triggered via github actions interface:

name: Acquire activation file
on:
  workflow_dispatch:
    inputs:
      unityVersion:
        description: 'Unity version to use during activation request'
        required: true
        default: 2020.1.7f1
jobs:
  activation:
    name: Request manual activation file 🔑
    runs-on: ubuntu-latest
    steps:
      # Request manual activation file
      - name: Request manual activation file
        id: getManualLicenseFile
        uses: webbertakken/[email protected]
        with:
          unityVersion: ${{ github.event.inputs.unityVersion }}
      # Upload artifact (Unity_v20XX.X.XXXX.alf)
      - name: Expose as artifact
        uses: actions/upload-artifact@v1
        with:
          name: ${{ steps.getManualLicenseFile.outputs.filePath }}
          path: ${{ steps.getManualLicenseFile.outputs.filePath }}

image

GabLeRoux added a commit to game-ci/unity-actions-example that referenced this issue Oct 8, 2020
@GabLeRoux
Copy link
Member Author

GabLeRoux commented Oct 17, 2020

I've played with github-actions again and instead of workflow_dispatch, I came up with a solution where we check if UNITY_LICENSE secret is set. If it's not set, we run the activation job, if it's set, we run the tests and the builds.

See .github/workflows/main.yml#L1-L42

Also note some refactors where we don't need to repeat unity versions, workflow paths, etc. I think this is the kind of workflow that can easily be sent as a PR directly to any unity github project. I'm not sure the build and test parts are working fine in here tho. I tried on a random project on github and it failed, but the problem could also be the project itself ;). The conditions part did work as expected.

Here's a more concise example of running jobs based on conditions (github-actions specific)

@webbertakken
Copy link
Member

Awesome! That looks like a great solution indeed.

By the way are you able to check this for all secrets starting with UNITY_LICENSE_ such as UNITY_LICENSE_2019_3.

(this case may soon not be needed anymore, but it would be nice to have).

@jgollenz
Copy link

Hey guys, since I just ran into this after looking frantically for that sneaky artifact I wondered what your plans are with this issue. Since all this is about how to make life easier for us lazy people, I also think that GabLeRoux's idea is the way to go. Btw, I am looking at your screenshot and it is not identically to how that page looks now (at least for me). If it changes this much in four months, maybe it's not the best idea to go down that road. People will probably get confused if it is not updated

@webbertakken
Copy link
Member

@jgollenz I'm not sure what you're getting at. Could you please explain what you mean exactly?

@jgollenz
Copy link

jgollenz commented Feb 26, 2021

I was talking about GabLeRoux's idea of checking whether the UNITY_LICENSE secret is present and only requesting the .alf file when it is not. Since this issue is not closed, I assumed it was not implemented yet.

And the other thing I meant was the screenshot of where the artifact can be downloaded. The page now has subtle UI changes compared to the time when GabLeRoux created that screenshot. While I do think that a screenshot would be a great idea (since I was looking for the place to download the artifact myself), I am not sure how big of an issue it is, if that page changes from time to time. Maybe it's not an issue at all for other people, I just noticed that it looks different now and got confused.

But, if you still want that screenshot in the docs and nobody has claimed that part of the issue, maybe I could do it. Since it is marked as good-first-issue ;)

@webbertakken
Copy link
Member

I was talking about GabLeRoux's idea of checking whether the UNITY_LICENSE secret is present and only requesting the .alf file when it is not. Since this issue is not closed, I assumed it was not implemented yet.

Indeed. It's not documented as far as I know. Feel free to add a PR if you like this.

While I do think that a screenshot would be a great idea

Yup great idea. Feel free to add, though please note that we haven't embedded any images in markdown so far, so it may be slightly harder than expected to do this right now. Feel free to open a PR if you have ideas on how to do this.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers hacktoberfest https://hacktoberfest.digitalocean.com/
Projects
None yet
Development

No branches or pull requests

3 participants