Skip to content

Test CI for publishing builtin plugins #4

Test CI for publishing builtin plugins

Test CI for publishing builtin plugins #4

name: Publish Built-in Plugins
on:
release:
types:
- published
pull_request:
jobs:
publish:
name: Publish plugins
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: nightly-2024-10-15
- name: Init Scarb to cache plugins
id: scarb-init
run: |
set -eo pipefail
mkdir -p $HOME/pkg
pushd $HOME/pkg
scarb init --no-vcs
echo "CAIRO_VERSION=$(scarb metadata --format-version 1 | jq -r '.app_version_info.cairo.version')" >> $GITHUB_OUTPUT
popd
env:
SCARB_INIT_TEST_RUNNER: cairo-test
- name: Publish plugins from cache
run: |
set -eo pipefail
tree -a $HOME/.cache/scarb/
pushd $HOME/.cache/scarb/registry/std/v${{ steps.scarb-init.outputs.CAIRO_VERSION }}
for package_dir in *; do
if [ -d "$package_dir" ] && [ "$package_dir" != "core" ]; then
pushd "$package_dir"
scarb publish --index https://scarbs.dev --no-verify
popd
fi
done
env:
SCARB_REGISTRY_AUTH_TOKEN: ${{ secrets.SCARB_REGISTRY_AUTH_TOKEN }}