chore: bump package versions #3120
This file contains hidden or 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: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: write # to be able to publish a GitHub release | |
| env: | |
| VITE_ENV: "ci" | |
| HOSTNAME: "app-ipfs.venus.io" | |
| CLI_NODE_REAL_API_KEY: ${{ secrets.CLI_NODE_REAL_API_KEY }} | |
| CLI_ALCHEMY_API_KEY: ${{ secrets.CLI_ALCHEMY_API_KEY }} | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ".nvmrc" | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: "yarn" | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install dependencies | |
| run: | | |
| yarn | |
| # Install required npm version to use trusted publisher | |
| # (https://docs.npmjs.com/trusted-publishers) | |
| npm install -g npm@11.5.1 | |
| - name: Run tests and collect coverage | |
| run: yarn test --coverage | |
| # Bump package versions based on changesets and commit changes to the main branch | |
| - name: Publish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} | |
| BLOB_READ_WRITE_TOKEN: ${{ secrets.VERCEL_BLOB_TOKEN }} | |
| IMG_CDN_URL: ${{ vars.IMG_CDN_URL }} | |
| run: | | |
| git config user.name toolsvenus | |
| git config user.email tools@venus.io | |
| git fetch origin | |
| git rebase --strategy-option=theirs origin/main | |
| npx changeset version | |
| if git diff -- "packages/chains/package.json" | grep -qE '^\+ *"version":'; then | |
| yarn workspace @venusprotocol/chains deploy-images | |
| yarn workspace @venusprotocol/chains build | |
| fi | |
| npx changeset publish | |
| git add -A | |
| git status | |
| git commit --verbose -a -m "chore: bump package versions" || exit 0 | |
| git push | |
| - name: Build | |
| env: | |
| VITE_NETWORK: "mainnet" | |
| VITE_ENV: "production" | |
| VITE_SENTRY_DSN: ${{ secrets.VITE_SENTRY_DSN }} | |
| VITE_POSTHOG_API_KEY: ${{ secrets.VITE_POSTHOG_API_KEY }} | |
| VITE_POSTHOG_HOST_URL: ${{ secrets.VITE_POSTHOG_HOST_URL }} | |
| VITE_ZYFI_API_KEY: ${{ secrets.VITE_ZYFI_API_KEY }} | |
| VITE_ALCHEMY_API_KEY: ${{ secrets.VITE_ALCHEMY_API_KEY }} | |
| VITE_NODE_REAL_API_KEY: ${{ secrets.VITE_NODE_REAL_API_KEY }} | |
| VITE_THE_GRAPH_API_KEY: ${{ secrets.VITE_THE_GRAPH_API_KEY }} | |
| run: | | |
| # We only build the dApp because it's the only app deployed to IPFS | |
| yarn build --filter=@venusprotocol/evm | |
| - name: Upload to IPFS and pin | |
| id: uploadBuildToIpfs | |
| uses: VenusProtocol/pinata-action@96e90c7a6eb52b60267a323758d89d25bf5e1d72 | |
| with: | |
| path: ./apps/evm/build | |
| pinName: ${{ env.HOSTNAME }} | |
| maxPinsToKeep: 20 | |
| pinataApiKey: ${{ secrets.PINATA_API_KEY }} | |
| pinataApiSecret: ${{ secrets.PINATA_API_SECRET }} | |
| - name: Update DNS record and purge cache | |
| uses: VenusProtocol/cloudflare-dnslink-action@297058f76eaeb59a95bc6352e7535f49a56ff456 | |
| with: | |
| cid: ${{ steps.uploadBuildToIpfs.outputs.cid }} | |
| purge: true | |
| cloudflareHostname: ${{ env.HOSTNAME }} | |
| cloudflareApiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| cloudflareZoneId: ${{ secrets.CLOUDFLARE_ZONE_ID }} | |
| - name: Warm up cache | |
| uses: VenusProtocol/globalping-action@f38ac8fef000087c08282a4437b54e398bd6f42a | |
| with: | |
| target: ${{ env.HOSTNAME }} | |
| countryCodes: | | |
| SG | |
| HK | |
| JP | |
| DE | |
| US | |
| BR | |
| GB | |
| FR | |
| SE | |
| AU | |
| IN | |
| IE | |