-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from ballerina-platform/RolandHewage-patch-1
Create dev-stg-release.yml
- Loading branch information
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |