Merge Bid and Payment messages, add way to specify dynamic job cost o… #165
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
name: Build Javascript/Typescript | |
on: | |
push: | |
release: | |
types: [published] | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '21' | |
registry-url: 'https://npm.pkg.github.com' | |
- name: Build | |
run: bash build-javascript.sh | |
- name: Prepare for upload | |
run: | | |
mv build/javascript/openagents-*-proto-*.tgz build/javascript/openagents_grpc_proto-JAVASCRIPT.tgz | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist-javascript | |
path: build/javascript/*.tgz | |
- name: Upload release asset | |
if: github.event_name == 'release' | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: build/javascript/openagents_grpc_proto-JAVASCRIPT.tgz | |
- name: Publish | |
if: github.event_name == 'release' | |
run: | | |
cd build/javascript | |
echo "Rename package to ${{ github.repository_owner }}/${{github.event.repository.name}} for github package registry" | |
sed -i 's/"name": "openagents-grpc-proto"/"name": "@${{ github.repository_owner }}\/${{github.event.repository.name}}"/g' package.json | |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc | |
npm publish --registry https://npm.pkg.github.com --access public | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} |