forked from wso2/api-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (81 loc) · 3.11 KB
/
gateway-release.yml
File metadata and controls
99 lines (81 loc) · 3.11 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
89
90
91
92
93
94
95
96
97
98
99
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.26.2'
cache: false
- 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 tag -a ai-gateway/v${{ steps.version.outputs.version }} -m "AI Gateway ${{ steps.version.outputs.version }}"
git push origin gateway/v${{ steps.version.outputs.version }}
git push origin ai-gateway/v${{ steps.version.outputs.version }}
- name: Bump to next dev version
run: make -C gateway version-bump-next-dev
- name: Commit version bump
run: |
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
git commit -am "Bump gateway 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 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.
branch: version-bump-${{ github.run_id }}
base: main
delete-branch: true
assignees: renuka-fernando
labels: |
automated
version-bump