Publish npm packages from Action
Summary: Adds an action for publishing packages to npm. Secret was added as part of T80403944. Reviewed By: nikoant Differential Revision: D25195740 fbshipit-source-id: 51d43d9f5e84a25a67b637233b2c62a9a1a15063
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b5e613141e
commit
30628c8139
28
.github/workflows/publish-npm.yml
vendored
Normal file
28
.github/workflows/publish-npm.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
name: Publish NPM
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- v*
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: desktop/
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '12.x'
|
||||||
|
- name: Install
|
||||||
|
run: yarn
|
||||||
|
- name: Set up npm token
|
||||||
|
run: echo "//registry.yarnpkg.com/:_authToken=${{ secrets.FLIPPER_NPM_TOKEN }}" >> ~/.npmrc
|
||||||
|
- name: Publish packages
|
||||||
|
run: yarn publish-packages
|
||||||
|
- name: Publish React Native
|
||||||
|
run: yarn publish
|
||||||
|
working-directory: react-native/react-native-flipper
|
||||||
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
@@ -181,10 +181,17 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Workflow Dispatch
|
- name: Publish Workflow Dispatch
|
||||||
if: ${{ needs.release.outputs.tag != '' }}
|
if: ${{ needs.release.outputs.tag != '' }}
|
||||||
uses: benc-uk/workflow-dispatch@v1.1
|
uses: benc-uk/workflow-dispatch@v1.1
|
||||||
with:
|
with:
|
||||||
workflow: Publish Pods
|
workflow: Publish Pods
|
||||||
token: ${{ secrets.PERSONAL_TOKEN }}
|
token: ${{ secrets.PERSONAL_TOKEN }}
|
||||||
ref: ${{ needs.release.outputs.tag }}
|
ref: ${{ needs.release.outputs.tag }}
|
||||||
|
- name: Publish NPM
|
||||||
|
if: ${{ needs.release.outputs.tag != '' }}
|
||||||
|
uses: benc-uk/workflow-dispatch@v1.1
|
||||||
|
with:
|
||||||
|
workflow: Publish NPM
|
||||||
|
token: ${{ secrets.PERSONAL_TOKEN }}
|
||||||
|
ref: ${{ needs.release.outputs.tag }}
|
||||||
|
|||||||
Reference in New Issue
Block a user