Skip to content

Commit

Permalink
use parcel for proper build
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Aug 29, 2024
1 parent 18acaa2 commit 6c6d0a0
Show file tree
Hide file tree
Showing 11 changed files with 3,052 additions and 49 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/js-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and release beta
on:
push:
branches:
- 'main'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name:
uses: bufbuild/buf-setup-action@v1
with:
version: latest
- run: buf --version
- name: setup node
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: 'bot: version bump'
uses: 'phips28/gh-action-bump-version@master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGEJSON_DIR: 'js'
with:
version-type: 'prerelease'
commit-message: 'bump'
skip-tag: 'true'
- name: Build and publish
run: |
bash generate.sh
cd js
buf generate
npm install
npm run build
npm config set '//registry.npmjs.org/:_authToken' $NPM_TOKEN
npm publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/js-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and release client
name: Build and release proto js
on:
release:
types: [ published ]
Expand All @@ -23,6 +23,7 @@ jobs:
cd js
buf generate
npm install
npm run build
npm config set '//registry.npmjs.org/:_authToken' $NPM_TOKEN
npm publish
env:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ log
build/
tmp/
node_modules/
/js/.parcel-cache
/js/src/gen/*
/js/dist
5 changes: 5 additions & 0 deletions js/.npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
tsconfig.json
tsconfig-cjs.json
tslint.json
.DS_Store
.parcel-cache
node_modules/
src/
3 changes: 1 addition & 2 deletions js/buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ plugins:
- remote: buf.build/bufbuild/es:v2.0.0
out: src/gen
opt:
- target=dts+js
- import_extension=js
- target=ts
inputs:
- directory: ../proto_files
- module: buf.build/bufbuild/protovalidate
Expand Down
Loading

0 comments on commit 6c6d0a0

Please sign in to comment.