bump anchor version to 0.31.0 (#36) #22
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: Generate Anchor IDL | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: # Allows manual triggering | |
| jobs: | |
| generate-idl: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Ensures full history for commits | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| - uses: metadaoproject/[email protected] | |
| with: | |
| anchor-version: "0.31.0" | |
| solana-cli-version: "2.1.15" # Set it to 2.x.x to use the Anza release | |
| node-version: "20.16.0" | |
| - run: anchor build | |
| # TODO: test rust caching | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Move idl.json | |
| run: | | |
| mv target/idl/locker.json ./sdk/artifacts/ | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| title: "Update IDL" | |
| # only add generated locker.json file | |
| add-paths: | | |
| sdk/artifacts/locker.json | |
| # branch name, see https://github.com/marketplace/actions/create-pull-request#action-behaviour | |
| branch: idl | |
| # always create unique branch name, see https://github.com/marketplace/actions/create-pull-request#alternative-strategy---always-create-a-new-pull-request-branch | |
| branch-suffix: timestamp |