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 CI to publish builtin plugins #1648

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

DelevoXDG
Copy link
Contributor

@DelevoXDG DelevoXDG commented Oct 15, 2024

@DelevoXDG DelevoXDG changed the title Add CI to publish built-in plugins Add CI to publish builtin plugins Oct 16, 2024
name: Publish plugins
runs-on: ubuntu-latest
env:
SCARB_REGISTRY_AUTH_TOKEN: ${{ secrets.SCARB_REGISTRY_AUTH_TOKEN }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What token do you think we should keep in our GitHub secrets? Do we want to use some sort of an organization account, or will my personal token do for now? :D

Also, do you think we need any expiration date for it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Your personal will do. One year rotation seems alright.

@DelevoXDG DelevoXDG marked this pull request as ready for review October 16, 2024 12:26
name: Publish plugins
runs-on: ubuntu-latest
env:
SCARB_REGISTRY_AUTH_TOKEN: ${{ secrets.SCARB_REGISTRY_AUTH_TOKEN }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Your personal will do. One year rotation seems alright.

env:
SCARB_INIT_TEST_RUNNER: cairo-test

- name: Check if plugin versions exist in the registry
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to check it here? Can't we just try to publish and let the pipeline fail if it has already been uploaded? (Generally it expect it not to be, right?)

if: steps.check-plugins.outputs.starknet_exists != 'true'
run: |
pushd $HOME/.cache/scarb/registry/std/v${{ steps.scarb-init.outputs.CAIRO_VERSION }}/starknet
scarb publish --no-verify
Copy link
Contributor

Choose a reason for hiding this comment

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

Why no verify?

- name: Publish starknet
if: steps.check-plugins.outputs.starknet_exists != 'true'
run: |
pushd $HOME/.cache/scarb/registry/std/v${{ steps.scarb-init.outputs.CAIRO_VERSION }}/starknet
Copy link
Contributor

Choose a reason for hiding this comment

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

This should read path from Scarb, instead of hardcoding it here.


- uses: software-mansion/setup-scarb@v1
with:
scarb-version: ${{ github.ref_name }}
Copy link
Contributor

Choose a reason for hiding this comment

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

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 CI to upload builtin Cairo plugins
2 participants