Skip to content

v0.11.0

v0.11.0 #16

Workflow file for this run

name: Publish
on:
release:
types: [published]
permissions:
id-token: write
contents: write
jobs:
publish:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.25"
- name: Configure Git
run: |
git config user.email "github-actions@users.noreply.github.com"
git config user.name "GitHub Actions"
- name: Create release tags for submodules
run: |
VERSION=${{ github.event.release.tag_name }}
BRANCH=release-$VERSION
git checkout -b "$BRANCH"
sed -E -i 's|const Version = "0.0.0"|const Version = "'${VERSION#v}'"|' common/version.go
git add common/version.go
for mod in */go.mod; do
dir=$(dirname "$mod")
sed -E -i 's|github.com/apitally/apitally-go v0.0.0|github.com/apitally/apitally-go '$VERSION'|' "$mod"
(cd "$dir" && go mod tidy) || exit 1
git add "$mod" "$dir/go.sum"
done
git commit -m "chore: release version $VERSION"
for mod in */go.mod; do
dir=$(dirname "$mod")
tag="$dir/$VERSION"
git tag "$tag"
git push origin "$tag"
done