Skip to content

chore: release v0.1.1 #22

chore: release v0.1.1

chore: release v0.1.1 #22

Workflow file for this run

name: "ci"
permissions:
pull-requests: write
contents: write
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
lint:
timeout-minutes: 25
runs-on: ubuntu-24.04
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: setup
uses: ./.github/actions/devenv
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
nix-cache: /tmp/nixcache
- name: lint ecmascript
run: lint:es
shell: bash
- name: lint formatting
run: lint:format
shell: bash
- uses: clechasseur/rs-clippy-check@v3
with:
args: --all-features
docs:
timeout-minutes: 25
runs-on: ubuntu-24.04
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: setup
uses: ./.github/actions/devenv
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
nix-cache: /tmp/nixcache
- name: build docs
run: build:docs
shell: bash
test:
timeout-minutes: 25
runs-on: ubuntu-24.04
strategy:
matrix:
version: ["1.75.0", stable, nightly]
env:
RUSTUP_TOOLCHAIN: ${{ matrix.version }}
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: setup
uses: ./.github/actions/devenv
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
nix-cache: /tmp/nixcache
- name: test `wallet_standard_wallets` with `ssr`
run: test:wallet_standard_wallets:ssr
shell: bash
- name: test `wallet_standard_wallets` with `docs`
run: test:wallet_standard_wallets:docs
shell: bash
- name: test `wasm_client_solana` with `ssr`
run: test:wasm_client_solana:ssr
shell: bash
- name: test `wasm_client_solana` with `docs`
run: test:wasm_client_solana:docs
shell: bash
coverage:
timeout-minutes: 25
runs-on: ubuntu-24.04
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: setup
uses: ./.github/actions/devenv
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
nix-cache: /tmp/nixcache
- name: test coverage
run: coverage:all
shell: bash
- name: upload coverage
uses: codecov/codecov-action@v4
with:
files: codecov.json
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
build:
timeout-minutes: 25
runs-on: ubuntu-24.04
strategy:
matrix:
version: ["1.75.0", stable, nightly]
env:
RUSTUP_TOOLCHAIN: ${{ matrix.version }}
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: setup
uses: ./.github/actions/devenv
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
nix-cache: /tmp/nixcache
- name: build
run: cargo build
shell: bash
- name: build all features
run: build:all
shell: bash
release:
if: github.event_name == 'push'
runs-on: ubuntu-latest
needs: [test, lint, build]
steps:
- name: generate token
uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.APP_ID }} # <-- GitHub App ID secret name
private-key: ${{ secrets.APP_PRIVATE_KEY }} # <-- GitHub App private key secret name
- name: setup rust
uses: dtolnay/rust-toolchain@stable
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}
- name: release
uses: MarcoIeni/release-plz-action@v0.5
id: release-plz
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: tag released prs
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
RELEASES: ${{ steps.release-plz.outputs.releases }}
run: |
set -e
# Iterate over released packages and add a label to the PRs
# shipped with the release.
for release in $(echo "$RELEASES" | jq -r -c '.[]'); do
package_name=$(echo "$release" | jq -r '.package_name')
version=$(echo "$release" | jq -r '.version')
prs_length=$(echo "$release" | jq '.prs | length')
if [ "$prs_length" -gt 0 ]; then
# Create label.
# Use `--force` to overwrite the label,
# so that the command does not fail if the label already exists.
label="released:$package_name-$version"
echo "Creating label $label"
gh label create $label --color BFD4F2 --force
for pr in $(echo "$release" | jq -r -c '.prs[]'); do
pr_number=$(echo "$pr" | jq -r '.number')
echo "Adding label $label to PR #$pr_number"
gh pr edit $pr_number --add-label $label
done
else
echo "No PRs found for package $package_name"
fi
done
shell: bash