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

Automatically create OIDC token for pub.dev. #60

Merged
merged 3 commits into from Jan 5, 2023

Conversation

isoos
Copy link
Contributor

@isoos isoos commented Sep 1, 2022

@isoos
Copy link
Contributor Author

isoos commented Sep 1, 2022

/cc @jonasfj

setup.sh Outdated Show resolved Hide resolved
setup.sh Outdated Show resolved Hide resolved
@jonasfj
Copy link
Member

jonasfj commented Sep 7, 2022

Is there any reason to merge this before, we've tested it in production?

@isoos
Copy link
Contributor Author

isoos commented Sep 7, 2022

Is there any reason to merge this before, we've tested it in production?

I believe that after dart-lang/pub-dev#5975 gets to production, we can test this without merging by using the forked action in a workflow. There is no rush to merge it yet.

@isoos isoos force-pushed the oidc-token branch 2 times, most recently from cde23bc to 3906087 Compare September 12, 2022 12:01
@isoos
Copy link
Contributor Author

isoos commented Sep 12, 2022

Note: I was able to test the latest version (augmented with the proper path for the dart executable) and it seems to me that a later dart pub publish -f would work as expected (using the PUB_TOKEN from the environment).

@mit-mit
Copy link
Member

mit-mit commented Nov 21, 2022

@isoos @devoncarew @jonasfj are we ready to move forward with this?

@jonasfj
Copy link
Member

jonasfj commented Nov 21, 2022

We could potentially do if [ -x $(which jq) ]; then echo '....'; fi so that we don't try anything if jq is missing and instead print a warning.
But it's probably present on most github runners, maybe if people do custom runners they'll run into missing jq / curl.

Otherwise, I see no risk in shipping this, I think we agree that this is what we want in the Github Action.

@isoos
Copy link
Contributor Author

isoos commented Nov 22, 2022

We could potentially do if [ -x $(which jq) ]; then echo '....'; fi so that we don't try anything if jq is missing and instead print a warning.

Updated script with jq existence check (using command -v).

setup.sh Show resolved Hide resolved
@szakarias szakarias merged commit 7b1734b into dart-lang:main Jan 5, 2023
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.

None yet

5 participants