Version 8.0.0 #90
Workflow file for this run
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
# Publish packages online. | |
# This is performed only when a new Git tag | |
# with version information is added. | |
name: Publication | |
# With default Git settings, Unix-like systems use LF (`\n`) for new lines, | |
# while Windows uses CRLF (`\r\n`) in local repositories. | |
# This default Git behavior is not ideal for a cross-platform project like Rinf. | |
# Also, the file permission system on Windows is not compatible with unix-like OS. | |
# If you publish the packages on Windows with `dart pub publish` | |
# script files are very likely to produce error on unix-like OS. | |
# This issue has already been observed with `.sh` files. | |
# That's why we must use this automated Ubuntu workflow to publish packages. | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+*" # Should match the tag pattern set on `pub.dev` | |
workflow_dispatch: | |
jobs: | |
upload: | |
name: upload-all | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # Required for authentication using OIDC for `pub.dev` | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Dart SDK | |
uses: dart-lang/setup-dart@v1 # Required for configuring OIDC token | |
- name: Setup Flutter SDK | |
uses: subosito/flutter-action@v2 # Required for the Flutter FFI plugin | |
with: | |
channel: "stable" | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
# https://dart.dev/tools/pub/automated-publishing | |
- name: Publish the Flutter package | |
working-directory: flutter_package/ | |
run: | | |
dart pub publish --dry-run | |
dart pub publish --force | |
# Save the `crates.io` API token at | |
# `GitHub repo - Settings - Security - Secrets and variables - Actions`. | |
- name: Login to the crates registry | |
run: cargo login ${{ secrets.CRATES_IO_API_TOKEN }} | |
- name: Publish the procedural macro crate | |
run: | | |
cargo publish --manifest-path rust_crate_proc/Cargo.toml --dry-run | |
cargo publish --manifest-path rust_crate_proc/Cargo.toml | |
- name: Publish the binary crate | |
run: | | |
cargo publish --manifest-path rust_crate_cli/Cargo.toml --dry-run | |
cargo publish --manifest-path rust_crate_cli/Cargo.toml | |
- name: Publish the library crate | |
run: | | |
cargo publish --manifest-path rust_crate/Cargo.toml --dry-run | |
cargo publish --manifest-path rust_crate/Cargo.toml |