Merge pull request #45 from koxudaxi/interpolation-type-requirements #8
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
| name: Publish Rust Crates | |
| on: | |
| push: | |
| tags: | |
| - "**" | |
| permissions: | |
| contents: read | |
| env: | |
| RELEASE_VERSION: ${{ github.ref_name }} | |
| concurrency: | |
| group: publish-rust-${{ github.ref_name }} | |
| cancel-in-progress: false | |
| jobs: | |
| version-check: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Sync lockstep versions to release tag | |
| run: python3 scripts/manage_versions.py set "${{ env.RELEASE_VERSION }}" | |
| - name: Validate lockstep versions against tag | |
| run: python3 scripts/manage_versions.py check --tag "${{ env.RELEASE_VERSION }}" | |
| package-check: | |
| needs: version-check | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Sync lockstep versions to release tag | |
| run: python3 scripts/manage_versions.py set "${{ env.RELEASE_VERSION }}" | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@1.94.0 | |
| - name: Verify Rust crates package cleanly | |
| run: cargo package --allow-dirty --manifest-path rust/Cargo.toml -p tstring-syntax -p tstring-json -p tstring-toml -p tstring-yaml | |
| publish-syntax: | |
| needs: package-check | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| environment: | |
| name: crates-io | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Sync lockstep versions to release tag | |
| run: python3 scripts/manage_versions.py set "${{ env.RELEASE_VERSION }}" | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@1.94.0 | |
| - name: Publish tstring-syntax | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: cargo publish --allow-dirty --manifest-path rust/Cargo.toml -p tstring-syntax | |
| publish-json: | |
| needs: publish-syntax | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| environment: | |
| name: crates-io | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Sync lockstep versions to release tag | |
| run: python3 scripts/manage_versions.py set "${{ env.RELEASE_VERSION }}" | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@1.94.0 | |
| - name: Wait for tstring-syntax to appear on crates.io | |
| run: python3 .github/scripts/wait_for_crate.py tstring-syntax | |
| - name: Publish tstring-json | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: cargo publish --allow-dirty --manifest-path rust/Cargo.toml -p tstring-json | |
| publish-toml: | |
| needs: publish-json | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| environment: | |
| name: crates-io | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Sync lockstep versions to release tag | |
| run: python3 scripts/manage_versions.py set "${{ env.RELEASE_VERSION }}" | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@1.94.0 | |
| - name: Publish tstring-toml | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: cargo publish --allow-dirty --manifest-path rust/Cargo.toml -p tstring-toml | |
| publish-yaml: | |
| needs: publish-toml | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| environment: | |
| name: crates-io | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Sync lockstep versions to release tag | |
| run: python3 scripts/manage_versions.py set "${{ env.RELEASE_VERSION }}" | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@1.94.0 | |
| - name: Publish tstring-yaml | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: cargo publish --allow-dirty --manifest-path rust/Cargo.toml -p tstring-yaml |