name: Publish Cargo Package on: push: tags: - "v*" workflow_dispatch: jobs: publish: runs-on: ubuntu-22.04 env: CARGO_TERM_COLOR: always CARGO_REGISTRIES_FORGEJO_TOKEN: Bearer ${{ secrets.FORGEJO_CARGO_TOKEN }} FORGEJO_CARGO_INDEX: ${{ github.server_url }}/${{ github.repository_owner }}/_cargo-index.git steps: - name: Check out repository uses: https://data.forgejo.org/actions/checkout@v4 - name: Install Rust run: | if ! command -v cargo >/dev/null 2>&1; then curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal fi echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" . "$HOME/.cargo/env" rustup toolchain install stable --profile minimal rustup default stable cargo --version - name: Configure Cargo registry run: | mkdir -p "$HOME/.cargo" cat > "$HOME/.cargo/config.toml" <