diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..7269f0b --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:base"], + "reviewers": ["bartvdbraak"] +} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f69ff96..4f3621f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -145,12 +145,12 @@ jobs: keyweave-*.tar.xz keyweave-x86_64-pc-windows-gnu/keyweave.exe - sign: + release: needs: - pre-check - build - name: Checksum and sign + name: Sign and Release runs-on: ubuntu-latest permissions: id-token: write @@ -195,7 +195,6 @@ jobs: github-token: ${{ secrets.PAT_TOKEN }} script: | const sha256sums = ${{ steps.homebrew-inputs.outputs.sha256sums }} - await github.rest.actions.createWorkflowDispatch({ owner: 'bartvdbraak', repo: 'homebrew-keyweave', @@ -205,4 +204,20 @@ jobs: version: '${{ needs.pre-check.outputs.version }}', sha256sums: JSON.stringify(sha256sums) } - }) \ No newline at end of file + }) + + publish: + needs: release + name: Publish crate + runs-on: ubuntu-latest + steps: + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - run: cargo publish --token ${CARGO_REGISTRY_TOKEN} + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 58917dd..de438f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -852,7 +852,7 @@ dependencies = [ [[package]] name = "keyweave" -version = "0.2.1" +version = "0.2.2" dependencies = [ "azure_identity", "azure_security_keyvault", @@ -1464,9 +1464,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "socket2" diff --git a/Cargo.toml b/Cargo.toml index 99ac2fa..6cdcb7f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,13 @@ [package] name = "keyweave" -version = "0.2.1" +version = "0.2.2" edition = "2021" authors = ["Bart van der Braak "] +keywords = ["azure", "keyvault", "env"] +description = "Fetches secrets from Azure Key Vault and weaves them into a convenient .env file" +license = "GPL-3.0" +documentation = "https://docs.rs/keyweave" +repository = "https://github.com/bartvdbraak/keyweave/" [dependencies] azure_identity = "0.17.0" diff --git a/README.md b/README.md index f1ee98e..8ed42be 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Keyweave -Cluster +Cluster Keyweave is an open-source tool crafted to seamlessly fetch secrets from Azure Key Vault and weave them into a convenient `.env` file. Developed in Rust, Keyweave stands out for its efficiency and user-friendly design, making it an ideal choice for managing your application's secrets. @@ -15,14 +15,25 @@ Keyweave is an open-source tool crafted to seamlessly fetch secrets from Azure K Before diving into Keyweave, ensure you have the following prerequisites: -- **Azure Account**: Log into your Azure tenant and set up the right subscription, along with any Access Policies required for you to read and list secrets from your Key Vault. +- Logged into the right Azure tenant: -```sh -az login --tenant "your-tenant-guid" -az account set --subscription "your-subscription-guid" + ```bash + az login --tenant "your-tenant-guid" + ``` + +- Identity has `Get` and `List` Secret Permissions in the Access Policies of the Key Vault. + +## Installation + +### Cargo + +Keyweave is built with [Cargo](https://doc.rust-lang.org/cargo/), the Rust package manager. It can also be used to install from [crates.io](https://crates.io/crates/keyweave): + +```bash +cargo install keyweave ``` -## Installation (MacOS, Linux) +### Homebrew (MacOS, Linux) For MacOS and Linux systems, installation is a breeze with [Homebrew](https://brew.sh/). Simply run: @@ -31,13 +42,15 @@ brew tap bartvdbraak/keyweave brew install keyweave ``` -## Manual Download +### Manual Download If you prefer manual installation or need binaries for different platforms (including an executable for Windows), visit the [Releases](/releases) page of this GitHub repository. -## Building from Source +```powershell +Invoke-WebRequest -Uri 'https://github.com/bartvdbraak/keyweave/releases/latest/download/keyweave.exe' -OutFile 'keyweave.exe' +``` -Keyweave is built with [Cargo](https://doc.rust-lang.org/cargo/), the Rust package manager. +## Building from Source To build Keyweave from source, follow these steps: @@ -71,6 +84,10 @@ keyweave --vault_name [--output ] [--filter ] keyweave --vault_name my-key-vault --output my-env-file.env --filter my-secret ``` +## Documentation + +Additional documentation for this package can be found on [docs.rs](https://docs.rs/keyweave). + ## License Keyweave is licensed under the GPLv3 License. See [LICENSE](LICENSE) for more details. diff --git a/renovate.json b/renovate.json deleted file mode 100644 index 39a2b6e..0000000 --- a/renovate.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:base" - ] -}