Skip to content

Platform API Release #44

Platform API Release

Platform API Release #44

name: Platform API Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release (e.g., 0.1.0)'
required: true
type: string
env:
DOCKER_REGISTRY: ghcr.io/wso2/api-platform
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set version
run: |
VERSION=${{ inputs.version }}
make -C platform-api version-set VERSION=${VERSION}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.26.1'
cache: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
driver: docker-container
- name: Run tests
run: make test-platform-api
- 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-platform-api-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"
git commit -am "Release platform-api version ${{ inputs.version }}"
git tag -a platform-api/v${{ inputs.version }} -m "Platform API ${{ inputs.version }}"
git push origin platform-api/v${{ inputs.version }}
- name: Bump to next dev version
run: make -C platform-api version-bump-next-dev
- name: Commit version bump
run: |
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
git commit -am "Bump platform-api to next dev version"
else
echo "No changes to commit"
fi
- name: Create PR for version bump
id: create-pr
uses: peter-evans/create-pull-request@v6
with:
commit-message: "Bump platform-api to next dev version"
title: "chore: Bump platform-api to next dev version"
body: |
Automated version bump after release `platform-api/v${{ inputs.version }}`
This PR bumps the platform-api version to the next development version.
branch: platform-api-version-bump-${{ github.run_id }}
base: main
delete-branch: true
assignees: renuka-fernando
labels: |
automated
version-bump