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

Add use of upload-release-asset GitHub Action #9

Merged
merged 1 commit into from
Mar 22, 2020

Conversation

traversaro
Copy link
Member

Via this GitHub Action, it is possible to automatically upload the archive that contains the generate vcpkg archive.

See actions/upload-release-asset#34 for details.

See iit-danieli-joint-lab/idjl-software-dependencies-vcpkg#7 for a similar PR.

Via this GitHub Action, it is possible to automatically upload the archive that contains the generate vcpkg archive.

See actions/upload-release-asset#34 for details.

See iit-danieli-joint-lab/idjl-software-dependencies-vcpkg#7 for a similar PR.
@traversaro traversaro merged commit dd6b66d into master Mar 22, 2020
@traversaro traversaro deleted the add-upload-on-release branch March 22, 2020 15:59
traversaro added a commit that referenced this pull request Mar 24, 2020
The GitHub Action to upload release assets added  in #9 to automatically upload archive in releases was working correctly on small test releases, but it was failing with the error: 
~~~
##[error]Bad credentials
~~~
on the actual release workflow, that was taking more then 4 hours to complete (see for example: https://github.com/iit-danieli-joint-lab/idjl-software-dependencies-vcpkg/runs/529920938?check_suite_focus=true). It turns out that the problem here is that the automatically generated `GITHUB_TOKEN` secret expires after 1 hour:

> The installation access token expires after 60 minutes. GitHub fetches a token for each job, before the job begins.
>
> Note: When a workflow run or its jobs are queued for more than one hour, the token may expire before the job starts.

See https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#about-the-github_token-secret . 

For this reason, despite the examples provided in https://github.com/actions/upload-release-asset use `GITHUB_TOKEN`, for long  jobs it make sense to use a proper generated token (see https://help.github.com/en/enterprise/2.17/user/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line).  In this case, I already added  a new personal token with the proper permissions in the [secrets](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) of this repo under the name `ACCESS_TOKEN`, and this PR makes use of it.
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