-
Notifications
You must be signed in to change notification settings - Fork 75
88 lines (72 loc) · 2.55 KB
/
platform-api-release.yml
File metadata and controls
88 lines (72 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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.2'
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