From 6eb6c3704d5b55301bffe7f7ec13070487994a01 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 17 Jan 2024 02:42:22 +0100 Subject: [PATCH] ci for sure this time --- .gitea/workflows/cargo-publish.yaml | 15 ++++++++---- .gitea/workflows/cargo.yaml | 37 +++++++++++++++++++---------- 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/cargo-publish.yaml b/.gitea/workflows/cargo-publish.yaml index de55a47..baca221 100644 --- a/.gitea/workflows/cargo-publish.yaml +++ b/.gitea/workflows/cargo-publish.yaml @@ -12,9 +12,12 @@ jobs: # added or changed files to the repository. contents: write steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - - run: | + - name: get repo + uses: actions/checkout@v4 + - name: install rust + uses: dtolnay/rust-toolchain@stable + - name: config custom registry + run: | mkdir -p ~/.cargo/ echo -e '[registry] cscherr= "cscherr" @@ -23,9 +26,11 @@ jobs: index = "sparse+https://git.cscherr.de/api/packages/PlexSheep/cargo/" ' > ~/.cargo/config.toml cat ~/.cargo/config.toml - - uses: katyo/publish-crates@v2 + - name: publish crates on git.cscherr.de + uses: katyo/publish-crates@v2 with: - args: --registry cscherr --token ${{ secrets.CARGO_REGISTRY_TOKEN_CSCHERRDE }} + args: --registry cscherr + registry-token: "Bearer ${{ secrets.CARGO_REGISTRY_TOKEN_CSCHERRDE }}" #- uses: katyo/publish-crates@v2 # with: # args: --token ${{ secrets.CARGO_REGISTRY_TOKEN_CRATESIO }} diff --git a/.gitea/workflows/cargo.yaml b/.gitea/workflows/cargo.yaml index 394bf66..7212c2b 100644 --- a/.gitea/workflows/cargo.yaml +++ b/.gitea/workflows/cargo.yaml @@ -13,19 +13,32 @@ jobs: # added or changed files to the repository. contents: write steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - - run: cargo check --all-features --all-targets - - run: rustup component add rustfmt - - run: cargo fix --all-features --all-targets - - run: cargo fmt --all - - run: cargo test --all-features --all-targets - - uses: stefanzweifel/git-auto-commit-action@v5 + - name: get repo + uses: actions/checkout@v4 + - name: install rust + uses: dtolnay/rust-toolchain@stable + run: rustup component add rustfmt + - name: config custom registry + run: | + mkdir -p ~/.cargo/ + echo -e '[registry] + cscherr= "cscherr" + + [registries.cscherr] + index = "sparse+https://git.cscherr.de/api/packages/PlexSheep/cargo/" + ' > ~/.cargo/config.toml + cat ~/.cargo/config.toml + - name: cargo check + run: cargo check --all-features --all-targets + - name: cargo fix + run: cargo fix --all-features --all-targets + - name: cargo fmt + run: cargo fmt --all + - name: cargo test + run: cargo test --all-features --all-targets + - name: commit back to repository + uses: stefanzweifel/git-auto-commit-action@v5 with: # Optional. Commit message for the created commit. # Defaults to "Apply automatic changes" commit_message: automatic cargo CI changes - commit_user_name: Gitea CI - commit_user_email: noreply@cscherr.de - commit_author: Gitea CI - -- 2.40.1