diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 8fc5f25..448f0cc 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -42,7 +42,19 @@ jobs: index = "sparse+https://git.moturpin.com/api/packages/Matsubaa/cargo/" EOF + - name: Write Cargo credentials + env: + CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }} + run: | + mkdir -p ~/.cargo + umask 077 + cat > ~/.cargo/credentials.toml <<'EOF' + [registries.gitea] + token = "${CARGO_TOKEN}" + EOF + - name: Publish to Gitea Cargo registry env: CARGO_REGISTRIES_GITEA_TOKEN: ${{ secrets.CARGO_TOKEN }} - run: nix develop --extra-experimental-features "nix-command flakes" -c cargo publish --registry gitea --verbose \ No newline at end of file + CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }} + run: nix develop --extra-experimental-features "nix-command flakes" -c cargo publish --registry gitea --token "${CARGO_TOKEN}" --verbose \ No newline at end of file