feat: bump db package to 4.1.0 and use dep on that new version from c… #1688
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: Client | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'packages/client/**' | |
- '.github/workflows/client.yml' | |
- 'package-lock.json' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'packages/client/**' | |
- '.github/workflows/client.yml' | |
- 'package-lock.json' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: Test | |
strategy: | |
matrix: | |
node_version: | |
- 16 | |
- 18 | |
- 20 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node_version }} | |
- uses: bahmutov/npm-install@v1 | |
- run: npm run build --workspace packages/client | |
- run: npm test --workspace packages/client | |
- name: Bundle Size | |
if: matrix.node_version == 18 # does not work on node.js 20 yet | |
run: npm run test:size --workspace packages/client | |
- name: Test upload to staging | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
run: | | |
echo "$(date --utc --iso-8601=seconds) web3.storage upload test" > ./upload-test-small | |
./packages/w3/bin.js put ./upload-test-small --api https://api-staging.web3.storage --token ${{ secrets.STAGING_WEB3_TOKEN }} | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: GoogleCloudPlatform/release-please-action@v3 | |
id: tag-release | |
with: | |
path: packages/client | |
token: ${{ secrets.GITHUB_TOKEN }} | |
release-type: node | |
monorepo-tags: true | |
package-name: web3.storage | |
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Other Changes","hidden":false}]' | |
- uses: actions/checkout@v2 | |
if: ${{ steps.tag-release.outputs.releases_created }} | |
- uses: actions/setup-node@v2 | |
if: ${{ steps.tag-release.outputs.releases_created }} | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org/ | |
- uses: bahmutov/npm-install@v1 | |
if: ${{ steps.tag-release.outputs.releases_created }} | |
# --- Client deploy steps --------------------------------------------- | |
- name: Client - NPM Publish | |
if: ${{ steps.tag-release.outputs.releases_created }} | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} | |
run: npm publish --workspace packages/client |