Skip to content

increaseLiquidity.ts enhancements (#512) #24

increaseLiquidity.ts enhancements (#512)

increaseLiquidity.ts enhancements (#512) #24

Workflow file for this run

name: Publish
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
npm:
strategy:
matrix:
package: [core, client, whirlpool]
max-parallel: 1
fail-fast: true
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Anchor
uses: ./.github/actions/anchor
- name: Set Version
uses: ./.github/actions/version
with:
version: ${{ github.ref }}
manifest-file: ts-sdk/${{ matrix.package }}/package.json
- name: Setup npm
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- name: Setup yarn
run: yarn config set enableImmutableInstalls false
- name: Install dependencies
run: yarn install
- name: Build package
run: yarn build ts-sdk/${{ matrix.package }} --output-style static
- name: Publish package
working-directory: ts-sdk/${{ matrix.package }}
run: npm publish --access public
cargo:
strategy:
matrix:
package: [macros, core, client]
max-parallel: 1
fail-fast: true
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Anchor
uses: ./.github/actions/anchor
- name: Set Version
uses: ./.github/actions/version
with:
version: ${{ github.ref }}
manifest-file: rust-sdk/${{ matrix.package }}/Cargo.toml
- name: Install dependencies
run: yarn install
- name: Build package
run: yarn build rust-sdk/${{ matrix.package }} --output-style static
- name: Publish package
working-directory: rust-sdk/${{ matrix.package }}
run: cargo publish --allow-dirty
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}
idl:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Anchor
uses: ./.github/actions/anchor
- name: Build idl
run: anchor build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: idl
path: target/idl/*.json
if-no-files-found: error
release:
needs: [npm, cargo, idl]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: idl
- name: Create Release Name
id: name
run: echo "NAME=SDK - $(basename ${{ github.ref_name }})" >> $GITHUB_OUTPUT
- name: Create Release
uses: ncipollo/release-action@v1
with:
name: ${{ steps.name.outputs.NAME }}
generateReleaseNotes: true
allowUpdates: true
artifacts: idl.zip