Skip to content

Bump stefanzweifel/git-auto-commit-action from 4 to 5 #152

Bump stefanzweifel/git-auto-commit-action from 4 to 5

Bump stefanzweifel/git-auto-commit-action from 4 to 5 #152

Workflow file for this run

name: Rust
on:
push:
branches: [main]
tags: ['v[0-9].[0-9]+.[0-9]+']
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: msrd0/install-rlottie-action@v1
- run: cargo test --workspace --all-features
test-tg:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: msrd0/install-rlottie-action@v1
with:
vendor: TelegramMessenger
- run: cargo test --workspace --all-features
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo fmt --all -- --check
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: msrd0/install-rlottie-action@v1
- run: cargo doc --workspace --no-deps
env:
RUSTDOCFLAGS: "--default-theme ayu"
- run: tar c target/doc/ | zstd -10 -o rustdoc.tar.zst
- uses: actions/upload-artifact@v3
with:
name: rustdoc
path: rustdoc.tar.zst
pages:
runs-on: ubuntu-latest
needs: [doc]
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
ref: gh-pages
- uses: actions/download-artifact@v3
with:
name: rustdoc
- run: |
tar xfa rustdoc.tar.zst --strip-components=1
rm rustdoc.tar.zst
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "GitHub Pages for ${{github.sha}}"
pages-release:
runs-on: ubuntu-latest
needs: [doc]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
with:
ref: gh-pages
- uses: actions/download-artifact@v3
with:
name: rustdoc
- id: version
run: echo "::set-output name=version::${GITHUB_REF##refs/tags/v}"
- run: |
mkdir -p ${{steps.version.outputs.version}}
tar xfa rustdoc.tar.zst -C ${{steps.version.outputs.version}} --strip-components=2
rm rustdoc.tar.zst
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "GitHub Pages for v${{steps.version.outputs.version}}"