Skip to content

Commit

Permalink
Merge pull request #125 from ballerina-platform/LakshanSS-patch-1
Browse files Browse the repository at this point in the history
Add workflow to release to staging and dev
  • Loading branch information
LakshanSS authored Apr 18, 2022
2 parents ffa703e + 35ea37b commit e0da34d
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/dev-stg-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
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
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
env:
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
JAVA_OPTS: -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true
run: |
./gradlew build
- name: Ballerina Build
uses: ballerina-platform/ballerina-action/@master
with:
args:
pack ./slack
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
- name: Push to Staging
if: github.event.inputs.bal_central_environment == 'STAGE'
uses: ballerina-platform/ballerina-action/@master
with:
args:
push
env:
WORKING_DIR: ./slack
JAVA_HOME: /usr/lib/jvm/default-jvm
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_STAGE_ACCESS_TOKEN }}
- name: Push to Dev
if: github.event.inputs.bal_central_environment == 'DEV'
uses: ballerina-platform/ballerina-action/@master
with:
args:
push
env:
WORKING_DIR: ./slack
JAVA_HOME: /usr/lib/jvm/default-jvm
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }}

0 comments on commit e0da34d

Please sign in to comment.