Skip to content

Commit

Permalink
Merge pull request #1723 from lnash94/master
Browse files Browse the repository at this point in the history
[master] Update central publish workflow to publish dev and stage central
  • Loading branch information
lnash94 authored Jun 18, 2024
2 parents 0779c3f + 3a507b9 commit 94f77a7
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
37 changes: 36 additions & 1 deletion .github/workflows/central-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ name: Publish to the Ballerina central

on:
workflow_dispatch:
inputs:
environment:
type: choice
description: Select environment
required: true
options:
- CENTRAL
- DEV CENTRAL
- STAGE CENTRAL

jobs:
publish-release:
Expand All @@ -16,8 +25,11 @@ jobs:
java-version: 17.0.7
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish artifact
- name: Ballerina Central Push
if: ${{ github.event.inputs.environment == 'CENTRAL' }}
env:
BALLERINA_DEV_CENTRAL: false
BALLERINA_STAGE_CENTRAL: false
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_ACCESS_TOKEN }}
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
Expand All @@ -26,3 +38,26 @@ jobs:
nexusPassword: ${{ secrets.NEXUS_PASSWORD }}
run: |
./gradlew clean build -PpublishToCentral=true
- name: Ballerina Central Dev Push
if: ${{ github.event.inputs.environment == 'DEV CENTRAL' }}
env:
BALLERINA_DEV_CENTRAL: true
BALLERINA_STAGE_CENTRAL: false
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }}
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }}
run: |
./gradlew clean build -PpublishToCentral=true
- name: Ballerina Central Stage Push
if: ${{ github.event.inputs.environment == 'STAGE CENTRAL' }}
env:
BALLERINA_DEV_CENTRAL: false
BALLERINA_STAGE_CENTRAL: true
BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_STAGE_ACCESS_TOKEN }}
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }}
run: |
./gradlew clean build -PpublishToCentral=true
7 changes: 3 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
org.gradle.caching=true
group=io.ballerina
version=2.0.1-SNAPSHOT
version=2.1.0-SNAPSHOT

# Client Native Version
clientNativeVersion=1.0.1-SNAPSHOT
# Mark this as false to skip publishing the client native artifacts
clientNativePublish=false

#dependency
ballerinaLangVersion=2201.9.0
ballerinaLangVersion=2201.9.1
testngVersion=7.6.1
slf4jVersion=1.7.30
org.gradle.jvmargs=-Xmx4096M -Dfile.encoding=UTF-8
Expand Down Expand Up @@ -46,8 +46,7 @@ stdlibJwtVersion=2.11.0
stdlibOAuth2Version=2.11.0

# Stdlib Level 05
stdlibHttpVersion=2.11.1-20240527-111400-f6148d4

stdlibHttpVersion= 2.11.3-20240618-115300-a7af03c
# Stdlib Level 06
stdlibGrpcVersion=1.11.0
stdlibWebsocketVersion=2.11.0
Expand Down

0 comments on commit 94f77a7

Please sign in to comment.