Skip to content

Commit

Permalink
Specify react native version in Actions (#577)
Browse files Browse the repository at this point in the history
* specify react native version

* change order

* revert

* try clean install

* use lockfile

* revert, specify version of types/react-native too

* trigger checks

* Updating JS files

* revert changes in package.json

* Updating JS files

* don't add all modified files

* Updating package.json

* Updating package version

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
terryyoon-pdftron and github-actions[bot] authored Jun 30, 2022
1 parent 7bcb465 commit 48eb963
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/jsBuilder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }} # checks out the branch being merged into `master`

- name: Install dependencies
run: |
npm i
run: |
npm i @types/[email protected] --save-dev
npm i [email protected]
- name: Node setup
uses: actions/setup-node@v2
with:
Expand All @@ -37,7 +38,7 @@ jobs:
run: | # Change last line to your preferred commit message (I like `chore: build js files`).
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "Updating JS files" -a || echo "No commit needed. JS files are already up-to-date"
git commit -m "Updating JS files" || echo "No commit needed. JS files are already up-to-date"
- name: Push changes
uses: ad-m/[email protected]
Expand All @@ -46,7 +47,7 @@ jobs:
branch: ${{ github.event.pull_request.head.ref }} # pushes the commit to the branch being merged into `master`

package-json-update:
needs: transpile-ts
needs: transpile-ts
runs-on: ubuntu-latest

steps:
Expand All @@ -55,7 +56,7 @@ jobs:
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token.
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo.
ref: ${{ github.event.pull_request.head.sha }} # checks out the branch being merged into `master`
ref: ${{ github.event.pull_request.head.sha }} # checks out the branch being merged into `master`

- name: Get Latest package.json
run: |
Expand All @@ -65,18 +66,18 @@ jobs:
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "Updating package.json" -a || echo "No commit needed. Package.json is already up-to-date"
- name: Node setup
uses: actions/setup-node@v2
with:
node-version: 16
registry-url: https://registry.npmjs.org/
registry-url: https://registry.npmjs.org/

- name: Update package.json
run: node scripts/update_version.js

- name: Add package.json
run: git add package.json
- name: Add package.json
run: git add package.json

- name: Commit files
run: | # Change last line to your preferred commit message (I like `chore: build js files`).
Expand All @@ -88,4 +89,4 @@ jobs:
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.event.pull_request.head.ref }} # pushes the commit to the branch being merged into `master`
branch: ${{ github.event.pull_request.head.ref }} # pushes the commit to the branch being merged into `master`
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-native-pdftron",
"title": "React Native Pdftron",
"version": "3.0.2-beta.110",
"version": "3.0.2-beta.111",
"description": "React Native Pdftron",
"main": "./lib/index.js",
"typings": "index.ts",
Expand Down

0 comments on commit 48eb963

Please sign in to comment.