--- name: "Release" on: workflow_dispatch: pull_request: types: [closed] branches: - main jobs: release: if: | github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')) permissions: contents: write pull-requests: read uses: github-community-projects/ospo-reusable-workflows/.github/workflows/release.yaml@3b691dff6b68489c8548e1295d125c93c9c29a4e with: publish: true release-config-name: release-drafter.yml secrets: github-token: ${{ secrets.GITHUB_TOKEN }} publish-cue: needs: release if: needs.release.outputs.full-tag != '' runs-on: ubuntu-latest permissions: contents: read steps: - name: Checkout uses: actions/checkout@v6.0.2 with: fetch-depth: 0 persist-credentials: false - name: Setup Cue uses: cue-lang/setup-cue@a93fa358375740cd8b0078f76355512b9208acb1 # v1.0.1 with: version: "v0.15.1" - name: Login to Central Registry run: cue login --token=${{ secrets.CUE_REG_TOKEN }} - name: Publish the module run: cue mod publish ${{ needs.release.outputs.full-tag }}