Skip to content

Commit

Permalink
Merge pull request #27 from ballerina-platform/RolandHewage-patch-1
Browse files Browse the repository at this point in the history
Create dev-stg-release.yml
  • Loading branch information
LakshanSS authored Apr 25, 2022
2 parents 98ad8ae + 78dd536 commit 3b3e365
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/dev-stg-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Dev/Staging BCentral Release

on:
workflow_dispatch:
inputs:
bal_central_environment:
description: Ballerina Central Environment
type: choice
options:
- STAGE
- DEV
required: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "release"
release:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
BALLERINA_${{ github.event.inputs.bal_central_environment }}_CENTRAL: true

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Set up Java Environment
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

# Build the ballerina project
- name: Ballerina Build
uses: ballerina-platform/ballerina-action@master
with:
args:
pack
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'
uses: ballerina-platform/ballerina-action@master
with:
args:
push
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_STAGE_ACCESS_TOKEN }}

# Push to Ballerina Dev Central
- name: Push to Dev
if: github.event.inputs.bal_central_environment == 'DEV'
uses: ballerina-platform/ballerina-action@master
with:
args:
push
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }}

0 comments on commit 3b3e365

Please sign in to comment.