Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,24 @@ jobs:
--generate-notes \
--latest=${{ steps.version.outputs.is_latest }} \
func-operator.yaml

# api/ is a separate Go module, versioned by tags with an api/ prefix.
# Tag it on the same commit with every release, so other projects (e.g. knative/func)
# can use the CRD types that match this operator version.
- name: Tag api module
run: |
TAG="api/v${{ steps.version.outputs.full }}"

# Release branches before release-0.4 have no api module
if [ ! -f api/go.mod ]; then
echo "No api module at this commit, skipping"
exit 0
fi

if git rev-parse -q --verify "refs/tags/$TAG" >/dev/null; then
echo "Tag $TAG already exists, skipping"
exit 0
fi

git tag "$TAG"
git push origin "$TAG"
6 changes: 6 additions & 0 deletions docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ For each tag, the `release` workflow:

4. **Creates a GitHub release** with auto-generated release notes and the install manifest attached

5. **Tags the `api` Go module** with `api/v{VERSION}` on the same commit, so other projects (e.g. knative/func) can import the CRD types that match this release:
```bash
go get github.com/functions-dev/func-operator/api@v{VERSION}
```
The tag is created for every release, even when `api/` did not change. It is skipped when the commit has no api module (release branches before `release-0.4`).

## Nightly Builds

The `nightly-build` workflow runs daily at 00:00 UTC and pushes images from `main` tagged as `:main`.
Expand Down
Loading