This action setup JBang cli.
name: jbang
on:
workflow_dispatch:
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# Configure build steps as you'd normally do
- name: Setup JBang
uses: jbangdev/setup-jbang@main
- name: properties
run: |
jbang properties@jbangdev
Important
|
This action will download a suitable Java runtime automatically if one is not available. Thus this action does not need a pre-configured Java setup. The action and JBang will though prefer to use a JDK if it is available. GitHub runners have a default Java 11 available thus it will use that Java by default. If you would like to use a different Java version/distribution, then add a actions/setup-java as needed. Example:
|
name: jbang
on:
workflow_dispatch:
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# Configure build steps as you'd normally do
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: |
11
17
- name: Setup JBang
uses: jbangdev/setup-jbang@main
- name: Configure java
run: |
jbang jdk install 11 ${{env.JAVA_HOME_11_X64}}
jbang jdk install 17 ${{env.JAVA_HOME_17_X64}}
- name: complexhelloworld
run: |
jbang properties@jbangdev java.vendor.version # uses the default java version
- name: test output 11
run: jbang --java 11 properties@jbangdev java.vendor.version # use java 11
- name: test output 17
run: jbang --java 17 properties@jbangdev java.vendor.version # use java 17
Following inputs can be used as step.with
keys
Name | Type | Default | Description |
---|---|---|---|
version |
String |
The JBang version to use. |