Skip to content

Commit eeec648

Browse files
committed
CI changes to publish npm
1 parent e8d5246 commit eeec648

2 files changed

Lines changed: 28 additions & 2 deletions

File tree

.github/workflows/release-cli.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,35 @@ jobs:
4444
- name: Build with Gradle
4545
working-directory: applications/cli
4646
run: ./gradlew --no-daemon -i -Pversion=${{ env.TAG }} clean build nativeCompile cliZip
47-
- name: Copy artifacts
47+
- name: Copy zip artifacts
4848
working-directory: applications/cli
4949
run: mv build/yaci-cli-${{ env.TAG }}.zip build/yaci-cli-${{ env.TAG }}-${{ env.os_prefix }}-${{ runner.arch }}.zip
50+
51+
- name: Determine Platform-Specific NPM Folder
52+
id: platform-folder
53+
run: |
54+
if [[ "${{ matrix.os }}" == "ubuntu-20.04" ]]; then
55+
echo "npm_folder=yaci-devkit-linux-x64" >> $GITHUB_ENV
56+
elif [[ "${{ matrix.os }}" == "macos-14" ]]; then
57+
echo "npm_folder=yaci-devkit-macos-arm64" >> $GITHUB_ENV
58+
fi
59+
echo "npm_folder=${{ env.npm_folder }}"
60+
61+
- name: Copy yaci-cli binary and config folder
62+
run: |
63+
cp applications/cli/build/native/nativeCompile/yaci-cli npm/${{ env.npm_folder }}/
64+
cp -r applications/cli/config npm/${{ env.npm_folder }}/
65+
66+
- name: Set npm package version
67+
working-directory: npm/${{ env.npm_folder }}
68+
run: npm version ${{ env.TAG }} --no-git-tag-version
69+
70+
- name: Publish to platform specific npm
71+
working-directory: npm/${{ env.npm_folder }}
72+
env:
73+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
74+
run: npm publish
75+
5076
- name: Release
5177
uses: softprops/action-gh-release@v1
5278
if: startsWith(github.ref, 'refs/tags/')

config/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
tag=0.10.0-preview3-dev1
1+
tag=0.10.0-preview3-dev2
22
revision=

0 commit comments

Comments
 (0)