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
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/.github/ @nikuscs
/Cargo.toml @nikuscs
/Cargo.lock @nikuscs
/rustfmt.toml @nikuscs
/config.example.toml @nikuscs
/migrations/ @nikuscs
/src/ @nikuscs
19 changes: 15 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
Expand All @@ -18,19 +21,23 @@ jobs:
check:
name: Check
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]'))
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo check --all-targets

fmt:
name: Format
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]'))
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
Expand All @@ -39,9 +46,11 @@ jobs:
clippy:
name: Clippy
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]'))
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
Expand All @@ -51,9 +60,11 @@ jobs:
test:
name: Test
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]'))
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test
17 changes: 15 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ concurrency:
group: release
cancel-in-progress: false

permissions:
contents: write
permissions: {}

env:
CARGO_TERM_COLOR: always
Expand All @@ -29,6 +28,8 @@ jobs:
checks:
name: Checks
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -46,6 +47,9 @@ jobs:
name: Create Tag
needs: checks
runs-on: ubuntu-latest
environment: production
permissions:
contents: write
outputs:
version: ${{ steps.bump.outputs.version }}
tag: ${{ steps.bump.outputs.tag }}
Expand Down Expand Up @@ -118,6 +122,8 @@ jobs:
name: Build (${{ matrix.target }})
needs: create-tag
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
include:
Expand Down Expand Up @@ -172,6 +178,10 @@ jobs:
name: Create Release
needs: [create-tag, build]
runs-on: ubuntu-latest
environment: production
permissions:
contents: write
pull-requests: read
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -247,6 +257,9 @@ jobs:
needs: [create-tag, build]
if: failure() && needs.create-tag.result == 'success'
runs-on: ubuntu-latest
environment: production
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
Loading