-
Notifications
You must be signed in to change notification settings - Fork 19
56 lines (49 loc) · 1.61 KB
/
dev-stg-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
52
53
54
55
56
name: Dev/Staging BCentral Release
on:
workflow_dispatch:
inputs:
bal_central_environment:
description: Ballerina Central Environment
type: choice
options:
- STAGE
- DEV
required: true
jobs:
release:
runs-on: ubuntu-latest
env:
BALLERINA_${{ github.event.inputs.bal_central_environment }}_CENTRAL: true
steps:
- uses: actions/checkout@v2
# Setup Ballerina Environment
- name: Set Up Ballerina
uses: ballerina-platform/[email protected]
with:
version: 2201.2.1
# Build Ballerina Project
- name: Ballerina Build
run: bal pack ./ballerina
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
# Build Module Examples
- name: Ballerina Examples Build
run: chmod +x ./examples/build.sh && ./examples/build.sh build
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
# Push to Ballerina Staging Central
- name: Push to Staging
if: github.event.inputs.bal_central_environment == 'STAGE'
run: bal push
working-directory: ./ballerina
env:
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_STAGE_ACCESS_TOKEN }}
JAVA_HOME: /usr/lib/jvm/default-jvm
# Push to Ballerina Dev Central
- name: Push to Dev
if: github.event.inputs.bal_central_environment == 'DEV'
run: bal push
working-directory: ./ballerina
env:
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }}
JAVA_HOME: /usr/lib/jvm/default-jvm