mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
ci: add publish workflow (WIP)
This commit is contained in:
31
.github/workflows/npm_release.yml
vendored
Normal file
31
.github/workflows/npm_release.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Release @nativescript/core to NPM
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'feat/monorepo' ]
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup
|
||||
run: npm run setup
|
||||
|
||||
- name: Generate Version
|
||||
working-directory: packages/core
|
||||
run: echo ::set-env name=NPM_VERSION::$(node -e "console.log(require('./package.json').version);")--$(date +"%m-%d-%Y-%s")-$GITHUB_RUN_NUMBER
|
||||
|
||||
- name: Bump Version
|
||||
working-directory: packages/core
|
||||
run: npm version $NPM_VERSION
|
||||
|
||||
- name: Build @nativescript/core
|
||||
run: npx nx run core:build.npm
|
||||
|
||||
- name: Publish @nativescript/core
|
||||
run: |
|
||||
echo dist/nativescript-core-$NPM_VERSION.tgz
|
||||
echo Publishing to NPM...
|
||||
Reference in New Issue
Block a user