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

The release workflow doesn't work #536

Open
suzuki-shunsuke opened this issue Sep 19, 2024 · 4 comments
Open

The release workflow doesn't work #536

suzuki-shunsuke opened this issue Sep 19, 2024 · 4 comments

Comments

@suzuki-shunsuke
Copy link

As of v2.14.0, go-car hasn't released pre built binaries.

https://github.com/ipld/go-car/releases/tag/v2.14.0
https://github.com/ipld/go-car/releases/tag/v2.14.1

image

Seems like the GitHub Actions workflow doesn't work.

https://github.com/ipld/go-car/actions/workflows/release-binaries.yml

image
@suzuki-shunsuke
Copy link
Author

The workflow releaser.yml creates GitHub Releases.

uses: ipdxco/unified-github-workflows/.github/workflows/[email protected]

I think you would expect that the workflow release-binaries.yml is triggered by publishing releases, but actually the workflow wasn't triggered because releases were created by GitHub Actions token.

https://github.com/ipdxco/unified-github-workflows/blob/61bc2a929b1a896da9559d6c4b14c574425da364/.github/workflows/releaser.yml#L152C22-L152C46

GitHub Actions token doesn't trigger new workflow runs.

https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow

When you use the repository's GITHUB_TOKEN to perform tasks, events triggered by the GITHUB_TOKEN, with the exception of workflow_dispatch and repository_dispatch, will not create a new workflow run.

So to trigger new workflow runs, you have to use a GitHub personal access token or GitHub App token instead.
The reusable workflow ipdxco/unified-github-workflows/.github/workflows/releaser.yml accepts a GitHub Access token UCI_GITHUB_TOKEN, so you can pass a GitHub personal access token but can't pass GitHub App token.

https://github.com/ipdxco/unified-github-workflows/blob/61bc2a929b1a896da9559d6c4b14c574425da364/.github/workflows/releaser.yml#L21-L23

@rvagg
Copy link
Member

rvagg commented Sep 19, 2024

noted in #532 (comment), but I don't have a solution; it could be that the releaser job needs a Go upgrade to match: https://github.com/ipld/go-car/blob/master/.github/workflows/release-binaries.yml
strangely there's no errors from running it, it just doesn't seem to want to trigger since its last run for 2.13.1 https://github.com/ipld/go-car/actions/runs/6096867926

@suzuki-shunsuke
Copy link
Author

The release v2.13.1 was created by you.

image

On the other hand, v2.14.0 and v2.14.1 were created by GitHub Actions token.

image

That's why the releaser workflow wasn't triggered.

https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow

When you use the repository's GITHUB_TOKEN to perform tasks, events triggered by the GITHUB_TOKEN, with the exception of workflow_dispatch and repository_dispatch, will not create a new workflow run.

@rvagg
Copy link
Member

rvagg commented Sep 25, 2024

Ahhh, you're right - I've always done the v2.x releases manually, leaving the version.json bump auto-release for the v0.x releases.

Attempting to fix with #540

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

No branches or pull requests

2 participants