Stubs

Teams

CI with GitHub Actions

Create a token with the registry:write scope, and save it as a repository secret named REGISTRY_TOKEN. This workflow pushes the module whenever main changes, labelled with the branch:

name: Push module
on:
  push:
    branches: [main]
jobs:
  push:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: stubsdev/setup-stubs@v1
      - name: Sign in
        run: echo "${{ secrets.REGISTRY_TOKEN }}" | stubs login stubs.dev --token-stdin
      - name: Push
        run: stubs push --label "${{ github.ref_name }}"

setup-stubs installs stubs (pin a version with version: for repeatable builds); the steps after it are the commands from Pushing modules, so they work the same way on your machine.