Skip to content

Conversation

@andrew-fleming
Copy link
Contributor

@andrew-fleming andrew-fleming commented Nov 24, 2025

Fixes #6

*Waiting on repo being OS to configure environment

@andrew-fleming andrew-fleming marked this pull request as ready for review November 26, 2025 02:57
@andrew-fleming andrew-fleming requested a review from a team as a code owner November 26, 2025 02:57
- major

permissions:
contents: write # Required to push commits and tags
Copy link
Contributor

Choose a reason for hiding this comment

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

would be better to move this to the jobs that need the permissions, perhaps not a high priority right now but it will bubble up again later as I will be trying to fix this across all of our repos.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. We're tracking this here #31

cd packages/${{ steps.pkg.outputs.dir }}
yarn npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Copy link
Contributor

Choose a reason for hiding this comment

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

I hope we can switch this off and use Trusted Publishing with OIDC auth later. Yarn should support it (yarnpkg/berry#6898, yarnpkg/berry#6911)

Choose a reason for hiding this comment

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

Just to be clear, You need to first publish the package and then enable OIDC for the subsequent versions.


1. Go to "Release Package" in Actions.
2. Click on the "Run workflow" dropdown menu.
3. Choose the package to release and the version bump type.
Copy link
Contributor

Choose a reason for hiding this comment

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

it looks like this will run on main?

- Create a git tag.
- Publish the package to npm.

6. Once published, go to "Releases" and create a GitHub release using the generated tag. No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

we could automate this too, perhaps a future improvement?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tracking here #30

Choose a reason for hiding this comment

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

Just FYI, If you guys haven't seen it, you can check how we are managing this using changesets here https://github.com/OpenZeppelin/relayer-plugin-channels/tree/main/.github/workflows. We pretty much standardized using changesets across all ts/js repos publishing to npm. Something to improve.

@emnul
Copy link
Contributor

emnul commented Dec 3, 2025

@andrew-fleming don't we need to change private: true in the cli and simulator package.json?

run: |
yarn config set npmAuthToken "$NPM_TOKEN"
cd packages/${{ steps.pkg.outputs.dir }}
yarn npm publish --access public
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to use the --provenance flag here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Copy link

@tirumerla tirumerla left a comment

Choose a reason for hiding this comment

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

Added few comments

- Create a git tag.
- Publish the package to npm.

6. Once published, go to "Releases" and create a GitHub release using the generated tag. No newline at end of file

Choose a reason for hiding this comment

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

Just FYI, If you guys haven't seen it, you can check how we are managing this using changesets here https://github.com/OpenZeppelin/relayer-plugin-channels/tree/main/.github/workflows. We pretty much standardized using changesets across all ts/js repos publishing to npm. Something to improve.

cd packages/${{ steps.pkg.outputs.dir }}
yarn npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

Choose a reason for hiding this comment

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

Just to be clear, You need to first publish the package and then enable OIDC for the subsequent versions.

@emnul emnul requested a review from a team as a code owner December 4, 2025 23:33
@andrew-fleming andrew-fleming mentioned this pull request Dec 12, 2025
@emnul emnul closed this Dec 19, 2025
@emnul
Copy link
Contributor

emnul commented Dec 19, 2025

Closing since the changes here were merged with #43

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.

Add release workflow

5 participants