Skip to content

Gateway Release

Gateway Release #15

name: Gateway Release
on:
workflow_dispatch:
env:
DOCKER_REGISTRY: ghcr.io/wso2/api-platform
jobs:
release:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Determine version from VERSION file
id: version
run: |
VERSION=$(make -C gateway version-get-release --no-print-directory)
echo "Releasing gateway version: ${VERSION}"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: Set version
run: |
VERSION=${{ steps.version.outputs.version }}
make -C gateway version-set VERSION=${VERSION}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
driver: docker-container
- name: Run tests
run: make test-gateway
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.API_PLATFORM_BOT_TOKEN }}
- name: Build and push multi arch Docker images
run: make build-and-push-gateway-multiarch
- name: Create and push tag
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
git commit -am "Release gateway version ${{ steps.version.outputs.version }}"
fi
git tag -a gateway/v${{ steps.version.outputs.version }} -m "Gateway ${{ steps.version.outputs.version }}"
git push origin gateway/v${{ steps.version.outputs.version }}
- name: Bump to next dev version
run: make -C gateway version-bump-next-dev
- name: Create PR for version bump
id: create-pr
uses: peter-evans/create-pull-request@v6
with:
commit-message: "Bump gateway to next dev version"
title: "chore: Bump gateway to next dev version"
body: |
Automated version bump after release `gateway/v${{ steps.version.outputs.version }}`
This PR bumps the gateway version to the next development version.
🤖 This PR will auto-merge once CI checks pass.
branch: version-bump-${{ github.run_id }}
base: main
delete-branch: true
labels: |
automated
version-bump
- name: Enable auto-merge
if: steps.create-pr.outputs.pull-request-number
run: gh pr merge --auto --squash ${{ steps.create-pr.outputs.pull-request-number }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}