forked from wso2/apk
-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (50 loc) · 1.92 KB
/
devportal-domain-service-release.yml
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
name: Release Devportal-domain-service.
on:
workflow_dispatch:
inputs:
release_version:
required: true
type: string
description: "Release Version"
next_version:
type: string
description: "Next Development Version"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cache Ballerina.
uses: actions/cache@v3
id: cache
with:
path: "ballerina-dist/*.deb"
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Download Ballerina distribution.
shell: sh
run: |
mkdir -p ballerina-dist
wget 'https://dist.ballerina.io/downloads/2201.3.0/ballerina-2201.3.0-swan-lake-linux-x64.deb' -P ballerina-dist
if: steps.cache.outputs.cache-hit != 'true'
- name: Install Ballerina distribution.
shell: sh
run: "sudo dpkg -i ballerina-dist/ballerina-2201.3.0-swan-lake-linux-x64.deb"
- name: Verify Ballerina Version
shell: sh
run: "bal -v"
- name: Checkout apk-repo
uses: actions/checkout@v3
with:
fetch-depth: "0"
path: apk-repo
token: ${{ secrets.WSO2_BOT_TOKEN }}
- name: Set release username and email
shell: sh
run: |
git config --global user.name ${{ secrets.WSO2_BOT_USER }}
git config --global user.email ${{ secrets.WSO2_BOT_EMAIL }}
- name: Run Gradle build
run: |
cd apk-repo/devportal/devportal-domain-service
gradle release -Prelease.useAutomaticVersion=true -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Prelease.releaseVersion=${{ github.event.inputs.release_version }} -Prelease.newVersion=${{ github.event.inputs.next_version }} -PmultiArch=true
gradle :ballerina:commit_toml_files
git push