Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new workflow to publish native handler to dev/stage environments #149

Merged
merged 4 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/native-handler-dev-stage-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Publish AsyncAPI native handler library to dev/stage central

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

jobs:
publish-release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 21.0.3

- name: Build the Package
env:
GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }}
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
run: |
./gradlew build -x test

- name: Set Up Ballerina
uses: ballerina-platform/[email protected]
with:
version: 2201.11.0

- name: Ballerina Central Dev Push
if: ${{ 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 }}
working-directory: native.handler
run: |
bal pack
bal push

- name: Ballerina Central Stage Push
if: ${{ 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 }}
working-directory: native.handler
run: |
bal pack
bal push
2 changes: 1 addition & 1 deletion native.handler/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
org = "ballerinax"
name = "asyncapi.native.handler"
version = "0.5.1-SNAPSHOT"
version = "0.5.0"
distribution = "2201.11.0"
readme = "Package.md"

Expand Down
2 changes: 1 addition & 1 deletion native.handler/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ modules = [
[[package]]
org = "ballerinax"
name = "asyncapi.native.handler"
version = "0.5.1-SNAPSHOT"
version = "0.5.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerinai", name = "observe"}
Expand Down
Loading