39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
name: RN - Publish node_modules ZIP to Nexus
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- package.json
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
pack-and-upload-js:
|
|
runs-on: [ default ]
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 18.18.0
|
|
- name: Clean NPM Modules
|
|
run: npm cache clean --force
|
|
- name: Install Node Modules
|
|
run: npm install
|
|
- name: Get Version from package.json
|
|
id: get-version
|
|
shell: bash
|
|
run: |
|
|
VERSION=$(node -p "require('./package.json').version")
|
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
|
- name: Create ZIP Archive of /node_modules
|
|
run: zip -r node_modules.zip node_modules
|
|
- name: Publish ZIP to Nexus
|
|
run: curl -u "${{ secrets.NEXUS_USERNAME }}:${{ secrets.NEXUS_PASSWORD }}" --upload-file node_modules.zip https://nexus.cmd.navi-tech.in/repository/android-apk-artifacts/react-native/${{ env.VERSION }}.zip
|