-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52a3288
commit 8189572
Showing
1 changed file
with
11 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
name: Publish React Native Package | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: 'Branch to publish from' | ||
required: true | ||
default: 'main' | ||
repository_dispatch: | ||
types: [publish] | ||
|
||
jobs: | ||
publish: | ||
name: Publish to npm | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.branch }} | ||
|
@@ -23,15 +15,15 @@ jobs: | |
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Log in to npm | ||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_ACCESS_TOKEN }}" > ~/.npmrc | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
run: npm install | ||
|
||
- name: Deploy to NPM | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Beachball Machine Account" | ||
git remote set-url origin https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git | ||
npm run beachball:publish -- --token "$NPM_ACCESS_TOKEN" | ||
- name: Publish to npm | ||
run: npm publish | ||
env: | ||
NPM_ACCESS_TOKEN: ${{ env.NPM_ACCESS_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} |