mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
name: '@nativescript/core -> npm'
|
|
|
|
on:
|
|
push:
|
|
branches: [ 'master' ]
|
|
|
|
env:
|
|
NPM_TAG: 'next'
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup
|
|
run: npm install
|
|
|
|
- name: Generate Version
|
|
working-directory: packages/core
|
|
run: |
|
|
echo NPM_VERSION=$(node -e "console.log(require('./package.json').version);")-$NPM_TAG-$(date +"%m-%d-%Y")-$GITHUB_RUN_ID >> $GITHUB_ENV
|
|
|
|
- name: Bump Version
|
|
working-directory: packages/core
|
|
run: npm version $NPM_VERSION
|
|
|
|
- name: Build @nativescript/core
|
|
run: npx nx run core:build
|
|
|
|
- name: Publish @nativescript/core
|
|
working-directory: dist/packages
|
|
env:
|
|
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
|
run: |
|
|
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
|
|
echo "Publishing @nativescript/core@$NPM_VERSION to NPM with tag $NPM_TAG..."
|
|
npm publish nativescript-core-$NPM_VERSION.tgz --tag $NPM_TAG --dry-run
|