feat: Make mailbox sizes configurable with sensible defaults (#149) #7
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: Publish Prerelease | |
| on: | |
| push: | |
| paths: | |
| # Only run if these files are changed | |
| - "**/Cargo.toml" | |
| - "**/*.yml" | |
| - "**/Cargo.lock" | |
| - "**/*.rs" | |
| branches: | |
| - main | |
| jobs: | |
| checks: | |
| uses: ./.github/workflows/checks.yml | |
| publish-crates-io: | |
| name: Publish prerelease to crates.io | |
| runs-on: ubuntu-latest | |
| needs: checks | |
| concurrency: | |
| group: prerelease-${{ github.ref }} | |
| cancel-in-progress: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@nightly | |
| - name: Install cargo-edit | |
| run: cargo install cargo-edit --locked | |
| - name: Compute prerelease version | |
| id: version | |
| run: | | |
| # Get base version from Cargo.toml (0.0.0) | |
| BASE_VERSION=$(cargo metadata --format-version=1 --no-deps \ | |
| | jq -r '.packages[] | select(.name=="libtortillas") | .version') | |
| # Strip patch for next prerelease (0.0.1-alpha.<sha>) | |
| NEXT_VERSION=$(echo "$BASE_VERSION" | awk -F. \ | |
| '{ printf "%d.%d.%d", $1, $2, $3+1 }') | |
| PRERELEASE_VERSION="${NEXT_VERSION}-alpha.${GITHUB_SHA::7}" | |
| echo "prerelease_version=$PRERELEASE_VERSION" >> $GITHUB_OUTPUT | |
| - name: Set prerelease version | |
| run: | | |
| cargo set-version -p libtortillas ${{ steps.version.outputs.prerelease_version }} | |
| - name: Verify package (pre-publish) | |
| run: cargo package -p libtortillas --allow-dirty | |
| - name: Publish to crates.io | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: cargo publish -p libtortillas --allow-dirty |