Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 3 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,52 +10,6 @@ permissions:
contents: read

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy, rustfmt

- name: Install Cargo Binary Install
uses: cargo-bins/cargo-binstall@main

- name: Install crates
run: cargo binstall -y --force cargo-deny cargo-machete cargo-sort

- name: Lint
run: cargo clippy --all-features --all-targets --locked

- name: Check dependencies
run: cargo deny check

- name: Check unused dependencies
run: cargo machete --with-metadata

- name: Check manifest formatting
run: cargo sort --workspace --check

- name: Check formatting
run: cargo fmt --all --check

test:
name: Test
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy, rustfmt

- name: Test
run: cargo test --all-features --all-targets --locked --release
rust:
name: Rust
uses: RustForWeb/.github/.github/workflows/rust.yml@c18f3b7315df398b6af8d03f823e31daeda63114
31 changes: 5 additions & 26 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,11 @@ on:
release:
types: [published]

permissions:
contents: read
id-token: write

jobs:
publish:
name: Publish
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install Cargo Binary Install
uses: cargo-bins/cargo-binstall@main

- name: Install crates
run: cargo binstall --force -y cargo-workspaces

- uses: rust-lang/crates-io-auth-action@v1
id: auth

- name: Publish
run: cargo workspaces publish --publish-as-is
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
uses: RustForWeb/.github/.github/workflows/publish.yml@c18f3b7315df398b6af8d03f823e31daeda63114
66 changes: 3 additions & 63 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,66 +18,6 @@ permissions:
jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- name: Generate GitHub App token
id: app-token
uses: getsentry/action-github-app-token@v3
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@v6

- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install Cargo Binary Install
uses: cargo-bins/cargo-binstall@main

- name: Install crates
run: cargo binstall --force -y cargo-workspaces toml-cli

- name: Bump version
run: cargo workspaces version --all --no-git-commit --yes ${{ inputs.bump }}

- name: Extract version
id: extract-version
run: echo "VERSION=v$(toml get Cargo.toml package.version --raw)" >> "$GITHUB_OUTPUT"

- name: Add changes
run: git add .

- name: Commit
id: commit
uses: dsanders11/github-app-commit-action@v1
with:
message: ${{ steps.extract-version.outputs.VERSION }}
token: ${{ steps.app-token.outputs.token }}

- name: Reset and pull
run: git reset --hard && git pull

- name: Tag
uses: actions/github-script@v8
env:
GIT_TAG: ${{ steps.extract-version.outputs.VERSION }}
GIT_SHA: ${{ steps.commit.outputs.sha }}
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${process.env.GIT_TAG}`,
sha: process.env.GIT_SHA
})

- name: Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
make_latest: true
tag_name: ${{ steps.extract-version.outputs.VERSION }}
token: ${{ steps.app-token.outputs.token }}
uses: RustForWeb/.github/.github/workflows/release.yml@c18f3b7315df398b6af8d03f823e31daeda63114
with:
bump: ${{ inputs.bump }}
Loading