From 8c97039800bf12d7cb947378016093c08dc135d9 Mon Sep 17 00:00:00 2001 From: Victor Garcia Date: Wed, 17 Jan 2024 13:08:21 +0100 Subject: [PATCH] Add simple beta script --- .github/workflows/main.yml | 1 - .github/workflows/pull_request.yml | 16 +++++++++++++--- scripts/publish-beta.sh | 7 +++++++ 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 scripts/publish-beta.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 378bb13..88e9c83 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,4 +20,3 @@ jobs: run: chmod +x ./gradlew - name: Test run: ./gradlew clean allTests - \ No newline at end of file diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index ea4e450..093153f 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -3,7 +3,7 @@ name: Pull request on: [pull_request] jobs: - unit-test: + publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -13,7 +13,17 @@ jobs: java-version: 17 distribution: temurin cache: 'gradle' + - uses: actions/setup-node@v1 + with: + node-version: 14.x + - name: Change wrapper permission run: chmod +x ./gradlew - - name: Test - run: ./gradlew clean allTests + + - name: Pack + run: ./gradlew clean packJsPackage + - name: Publish beta to NPMJS + run: + chmod +x ./scripts/publish-beta.sh + ./scripts/publish-beta.sh + diff --git a/scripts/publish-beta.sh b/scripts/publish-beta.sh new file mode 100644 index 0000000..b69b25f --- /dev/null +++ b/scripts/publish-beta.sh @@ -0,0 +1,7 @@ +set -ex + +cd build/packages/js + +npm version 0.1.0-beta.0 + +npm publish --tag beta \ No newline at end of file