TS generic fixes #16
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
name: Java build | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' # See 'Supported distributions' for available options | |
java-version: '21' | |
- name: Gradle build | |
run: ./gradlew shadowJar | |
- name: Download JDK sources | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y openjdk-21-source | |
- name: Generate java.base types | |
run: >- | |
java -jar build/libs/java-ts-bind-all.jar --packageJson java-core-types/package.json | |
- name: Generate java.net.http types | |
run: >- | |
java -jar build/libs/java-ts-bind-all.jar --packageJson httpclient-types/package.json | |
- uses: actions/setup-node@master | |
with: | |
registry-url: 'https://registry.npmjs.org' | |
if: github.ref == 'refs/heads/master' | |
- name: Publish core types | |
run: | | |
sed -i "s/VERSION/21.0.4-$(git rev-parse --short $GITHUB_SHA)/g" java-core-types/package.json | |
npm publish --access=public ./java-core-types | |
if: github.ref == 'refs/heads/master' | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
- name: Publish HttpClient types | |
run: | | |
sed -i "s/VERSION/21.0.4-$(git rev-parse --short $GITHUB_SHA)/g" httpclient-types/package.json | |
npm publish --access=public ./httpclient-types | |
if: github.ref == 'refs/heads/master' | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |