murk-secrets 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- murk_secrets-0.4.1/.config/nextest.toml +2 -0
- murk_secrets-0.4.1/.githooks/pre-commit +6 -0
- murk_secrets-0.4.1/.github/dependabot.yml +10 -0
- murk_secrets-0.4.1/.github/formula/murk.rb.template +36 -0
- murk_secrets-0.4.1/.github/workflows/ci.yaml +125 -0
- murk_secrets-0.4.1/.github/workflows/dependabot-automerge.yaml +27 -0
- murk_secrets-0.4.1/.github/workflows/python.yaml +131 -0
- murk_secrets-0.4.1/.github/workflows/release.yaml +168 -0
- murk_secrets-0.4.1/.gitignore +12 -0
- murk_secrets-0.4.1/Cargo.lock +2802 -0
- murk_secrets-0.4.1/Cargo.toml +50 -0
- murk_secrets-0.4.1/LICENSE-APACHE +200 -0
- murk_secrets-0.4.1/LICENSE-MIT +21 -0
- murk_secrets-0.4.1/Makefile +189 -0
- murk_secrets-0.4.1/PKG-INFO +126 -0
- murk_secrets-0.4.1/README.md +253 -0
- murk_secrets-0.4.1/SECURITY.md +55 -0
- murk_secrets-0.4.1/THREAT_MODEL.md +132 -0
- murk_secrets-0.4.1/cliff.toml +54 -0
- murk_secrets-0.4.1/codecov.yml +16 -0
- murk_secrets-0.4.1/demo/direnv.tape +96 -0
- murk_secrets-0.4.1/demo/eve.gif +0 -0
- murk_secrets-0.4.1/demo/eve.tape +78 -0
- murk_secrets-0.4.1/demo/github.tape +77 -0
- murk_secrets-0.4.1/demo/hero.gif +0 -0
- murk_secrets-0.4.1/demo/hero.tape +78 -0
- murk_secrets-0.4.1/demo/mallory.tape +119 -0
- murk_secrets-0.4.1/demo/offboard.gif +0 -0
- murk_secrets-0.4.1/demo/offboard.tape +153 -0
- murk_secrets-0.4.1/demo/recovery.gif +0 -0
- murk_secrets-0.4.1/demo/recovery.tape +56 -0
- murk_secrets-0.4.1/demo/setup.sh +166 -0
- murk_secrets-0.4.1/demo/ssh.tape +58 -0
- murk_secrets-0.4.1/demo/team.gif +0 -0
- murk_secrets-0.4.1/demo/team.tape +204 -0
- murk_secrets-0.4.1/demo/theme.tape +11 -0
- murk_secrets-0.4.1/deny.toml +32 -0
- murk_secrets-0.4.1/install.sh +80 -0
- murk_secrets-0.4.1/murk.pyi +15 -0
- murk_secrets-0.4.1/pyproject.toml +45 -0
- murk_secrets-0.4.1/python/README.md +100 -0
- murk_secrets-0.4.1/python/tests/conftest.py +67 -0
- murk_secrets-0.4.1/python/tests/test_murk.py +159 -0
- murk_secrets-0.4.1/src/codename.rs +83 -0
- murk_secrets-0.4.1/src/crypto.rs +331 -0
- murk_secrets-0.4.1/src/env.rs +847 -0
- murk_secrets-0.4.1/src/error.rs +75 -0
- murk_secrets-0.4.1/src/export.rs +707 -0
- murk_secrets-0.4.1/src/git.rs +165 -0
- murk_secrets-0.4.1/src/github.rs +122 -0
- murk_secrets-0.4.1/src/info.rs +355 -0
- murk_secrets-0.4.1/src/init.rs +265 -0
- murk_secrets-0.4.1/src/lib.rs +1379 -0
- murk_secrets-0.4.1/src/main.rs +1926 -0
- murk_secrets-0.4.1/src/merge.rs +1108 -0
- murk_secrets-0.4.1/src/python.rs +126 -0
- murk_secrets-0.4.1/src/recipients.rs +667 -0
- murk_secrets-0.4.1/src/recovery.rs +144 -0
- murk_secrets-0.4.1/src/secrets.rs +549 -0
- murk_secrets-0.4.1/src/testutil.rs +51 -0
- murk_secrets-0.4.1/src/types.rs +80 -0
- murk_secrets-0.4.1/src/vault.rs +317 -0
- murk_secrets-0.4.1/tests/cli.rs +2634 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
class Murk < Formula
|
|
2
|
+
desc "Encrypted secrets manager for developers"
|
|
3
|
+
homepage "https://github.com/iicky/murk"
|
|
4
|
+
version "__VERSION__"
|
|
5
|
+
license any_of: ["MIT", "Apache-2.0"]
|
|
6
|
+
|
|
7
|
+
on_macos do
|
|
8
|
+
on_intel do
|
|
9
|
+
url "https://github.com/iicky/murk/releases/download/v#{version}/murk-v#{version}-x86_64-apple-darwin.tar.gz"
|
|
10
|
+
sha256 "__SHA256_X86_64_APPLE_DARWIN__"
|
|
11
|
+
end
|
|
12
|
+
on_arm do
|
|
13
|
+
url "https://github.com/iicky/murk/releases/download/v#{version}/murk-v#{version}-aarch64-apple-darwin.tar.gz"
|
|
14
|
+
sha256 "__SHA256_AARCH64_APPLE_DARWIN__"
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
on_linux do
|
|
19
|
+
on_intel do
|
|
20
|
+
url "https://github.com/iicky/murk/releases/download/v#{version}/murk-v#{version}-x86_64-unknown-linux-gnu.tar.gz"
|
|
21
|
+
sha256 "__SHA256_X86_64_UNKNOWN_LINUX_GNU__"
|
|
22
|
+
end
|
|
23
|
+
on_arm do
|
|
24
|
+
url "https://github.com/iicky/murk/releases/download/v#{version}/murk-v#{version}-aarch64-unknown-linux-gnu.tar.gz"
|
|
25
|
+
sha256 "__SHA256_AARCH64_UNKNOWN_LINUX_GNU__"
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def install
|
|
30
|
+
bin.install "murk"
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
test do
|
|
34
|
+
assert_match version.to_s, shell_output("#{bin}/murk --version")
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
CARGO_TERM_COLOR: always
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
fmt:
|
|
14
|
+
name: Format
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
18
|
+
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
|
19
|
+
with:
|
|
20
|
+
components: rustfmt
|
|
21
|
+
- run: cargo fmt --check
|
|
22
|
+
|
|
23
|
+
clippy:
|
|
24
|
+
name: Clippy
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
28
|
+
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
|
29
|
+
with:
|
|
30
|
+
components: clippy
|
|
31
|
+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2
|
|
32
|
+
- run: cargo clippy -- -D warnings
|
|
33
|
+
|
|
34
|
+
test:
|
|
35
|
+
name: Test (${{ matrix.os }})
|
|
36
|
+
runs-on: ${{ matrix.os }}
|
|
37
|
+
strategy:
|
|
38
|
+
matrix:
|
|
39
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
42
|
+
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
|
43
|
+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2
|
|
44
|
+
- uses: taiki-e/install-action@f092c064826410a38929a5791d2c0225b94432fe # nextest
|
|
45
|
+
- run: cargo nextest run --profile ci
|
|
46
|
+
- uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1
|
|
47
|
+
if: always()
|
|
48
|
+
with:
|
|
49
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
50
|
+
files: target/nextest/ci/junit.xml
|
|
51
|
+
|
|
52
|
+
test-gate:
|
|
53
|
+
name: Test
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
needs: test
|
|
56
|
+
if: always()
|
|
57
|
+
steps:
|
|
58
|
+
- run: |
|
|
59
|
+
if [[ "${{ needs.test.result }}" != "success" ]]; then
|
|
60
|
+
echo "Test matrix failed"
|
|
61
|
+
exit 1
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
coverage:
|
|
65
|
+
name: Coverage
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
steps:
|
|
68
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
69
|
+
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
|
70
|
+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2
|
|
71
|
+
- run: cargo install cargo-tarpaulin
|
|
72
|
+
- run: cargo tarpaulin --out xml --skip-clean -- --test-threads=1
|
|
73
|
+
- uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5
|
|
74
|
+
with:
|
|
75
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
76
|
+
files: cobertura.xml
|
|
77
|
+
fail_ci_if_error: false
|
|
78
|
+
|
|
79
|
+
demo-test:
|
|
80
|
+
name: VHS Dress Rehearsal
|
|
81
|
+
runs-on: ubuntu-latest
|
|
82
|
+
steps:
|
|
83
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
84
|
+
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
|
85
|
+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2
|
|
86
|
+
- run: sudo apt-get install -y direnv
|
|
87
|
+
- run: make test-demos
|
|
88
|
+
|
|
89
|
+
vhs:
|
|
90
|
+
name: VHS
|
|
91
|
+
runs-on: ubuntu-latest
|
|
92
|
+
if: github.ref == 'refs/heads/main'
|
|
93
|
+
permissions:
|
|
94
|
+
contents: write
|
|
95
|
+
steps:
|
|
96
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
97
|
+
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
|
98
|
+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2
|
|
99
|
+
- run: rustup target add x86_64-unknown-linux-musl
|
|
100
|
+
- run: sudo apt-get install -y musl-tools
|
|
101
|
+
- run: cargo build --release --target x86_64-unknown-linux-musl
|
|
102
|
+
- name: Build VHS image with git
|
|
103
|
+
run: |
|
|
104
|
+
echo 'FROM ghcr.io/charmbracelet/vhs
|
|
105
|
+
RUN apt-get update --allow-releaseinfo-change && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*' | docker build -t vhs-git -
|
|
106
|
+
- name: Smoke test binary in VHS container
|
|
107
|
+
run: docker run --rm -v $PWD:/vhs --entrypoint /vhs/target/x86_64-unknown-linux-musl/release/murk vhs-git --version
|
|
108
|
+
- run: docker run --rm -v $PWD:/vhs -e PATH="/vhs/target/x86_64-unknown-linux-musl/release:$PATH" vhs-git demo/hero.tape
|
|
109
|
+
- run: docker run --rm -v $PWD:/vhs -e PATH="/vhs/target/x86_64-unknown-linux-musl/release:$PATH" vhs-git demo/team.tape
|
|
110
|
+
- run: docker run --rm -v $PWD:/vhs -e PATH="/vhs/target/x86_64-unknown-linux-musl/release:$PATH" vhs-git demo/offboard.tape
|
|
111
|
+
- run: docker run --rm -v $PWD:/vhs -e PATH="/vhs/target/x86_64-unknown-linux-musl/release:$PATH" vhs-git demo/eve.tape
|
|
112
|
+
- run: docker run --rm -v $PWD:/vhs -e PATH="/vhs/target/x86_64-unknown-linux-musl/release:$PATH" vhs-git demo/recovery.tape
|
|
113
|
+
- uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4
|
|
114
|
+
with:
|
|
115
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
116
|
+
publish_dir: ./demo
|
|
117
|
+
publish_branch: demo
|
|
118
|
+
keep_files: true
|
|
119
|
+
|
|
120
|
+
deny:
|
|
121
|
+
name: Deny
|
|
122
|
+
runs-on: ubuntu-latest
|
|
123
|
+
steps:
|
|
124
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
125
|
+
- uses: EmbarkStudios/cargo-deny-action@3fd3802e88374d3fe9159b834c7714ec57d6c979 # v2
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Dependabot auto-merge
|
|
2
|
+
|
|
3
|
+
on: pull_request
|
|
4
|
+
|
|
5
|
+
permissions:
|
|
6
|
+
contents: write
|
|
7
|
+
pull-requests: write
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
auto-merge:
|
|
11
|
+
if: github.actor == 'dependabot[bot]'
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Fetch Dependabot metadata
|
|
15
|
+
id: meta
|
|
16
|
+
uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2
|
|
17
|
+
with:
|
|
18
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
19
|
+
|
|
20
|
+
- name: Approve and auto-merge patch and minor updates
|
|
21
|
+
if: steps.meta.outputs.update-type == 'version-update:semver-patch' || steps.meta.outputs.update-type == 'version-update:semver-minor'
|
|
22
|
+
run: |
|
|
23
|
+
gh pr review --approve "$PR_URL"
|
|
24
|
+
gh pr merge --auto --squash "$PR_URL"
|
|
25
|
+
env:
|
|
26
|
+
PR_URL: ${{ github.event.pull_request.html_url }}
|
|
27
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
name: Python
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
pull_request:
|
|
7
|
+
paths:
|
|
8
|
+
- "src/python.rs"
|
|
9
|
+
- "python/**"
|
|
10
|
+
- "pyproject.toml"
|
|
11
|
+
- "murk.pyi"
|
|
12
|
+
- "Cargo.toml"
|
|
13
|
+
- ".github/workflows/python.yaml"
|
|
14
|
+
|
|
15
|
+
env:
|
|
16
|
+
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
lint:
|
|
20
|
+
name: Lint
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
24
|
+
- uses: astral-sh/ruff-action@4919ec5cf1f49eff0871dbcea0da843445b837e6 # v3
|
|
25
|
+
with:
|
|
26
|
+
src: python/
|
|
27
|
+
|
|
28
|
+
test:
|
|
29
|
+
name: Test
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
33
|
+
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
|
34
|
+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2
|
|
35
|
+
|
|
36
|
+
- name: Build release binary (for test fixture)
|
|
37
|
+
run: cargo build --release
|
|
38
|
+
|
|
39
|
+
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
|
|
40
|
+
|
|
41
|
+
- name: Install and test
|
|
42
|
+
run: |
|
|
43
|
+
uv venv
|
|
44
|
+
source .venv/bin/activate
|
|
45
|
+
uv pip install maturin pytest
|
|
46
|
+
maturin develop --features python
|
|
47
|
+
pytest python/tests -v
|
|
48
|
+
|
|
49
|
+
wheels:
|
|
50
|
+
name: Build wheels (${{ matrix.os }}, ${{ matrix.target }})
|
|
51
|
+
needs: [lint, test]
|
|
52
|
+
runs-on: ${{ matrix.os }}
|
|
53
|
+
strategy:
|
|
54
|
+
fail-fast: false
|
|
55
|
+
matrix:
|
|
56
|
+
include:
|
|
57
|
+
- os: ubuntu-latest
|
|
58
|
+
target: x86_64
|
|
59
|
+
- os: ubuntu-latest
|
|
60
|
+
target: aarch64
|
|
61
|
+
manylinux: manylinux_2_28
|
|
62
|
+
- os: macos-14
|
|
63
|
+
target: x86_64
|
|
64
|
+
- os: macos-latest
|
|
65
|
+
target: aarch64
|
|
66
|
+
- os: windows-latest
|
|
67
|
+
target: x64
|
|
68
|
+
steps:
|
|
69
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
70
|
+
|
|
71
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
72
|
+
with:
|
|
73
|
+
python-version: "3.12"
|
|
74
|
+
|
|
75
|
+
- name: Set up QEMU
|
|
76
|
+
if: runner.os == 'Linux' && matrix.target == 'aarch64'
|
|
77
|
+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3
|
|
78
|
+
with:
|
|
79
|
+
platforms: arm64
|
|
80
|
+
|
|
81
|
+
- name: Build wheels
|
|
82
|
+
uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1
|
|
83
|
+
env:
|
|
84
|
+
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
|
|
85
|
+
with:
|
|
86
|
+
target: ${{ matrix.target }}
|
|
87
|
+
args: --release --out dist --features python -i python3.12
|
|
88
|
+
manylinux: ${{ matrix.manylinux || 'auto' }}
|
|
89
|
+
docker-options: -e PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1
|
|
90
|
+
|
|
91
|
+
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
|
92
|
+
with:
|
|
93
|
+
name: wheels-${{ matrix.os }}-${{ matrix.target }}
|
|
94
|
+
path: dist/
|
|
95
|
+
|
|
96
|
+
sdist:
|
|
97
|
+
name: Build sdist
|
|
98
|
+
needs: [lint, test]
|
|
99
|
+
runs-on: ubuntu-latest
|
|
100
|
+
steps:
|
|
101
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
102
|
+
|
|
103
|
+
- name: Build sdist
|
|
104
|
+
uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1
|
|
105
|
+
with:
|
|
106
|
+
command: sdist
|
|
107
|
+
args: --out dist
|
|
108
|
+
|
|
109
|
+
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
|
110
|
+
with:
|
|
111
|
+
name: wheels-sdist
|
|
112
|
+
path: dist/
|
|
113
|
+
|
|
114
|
+
publish:
|
|
115
|
+
name: Publish to PyPI
|
|
116
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
117
|
+
needs: [wheels, sdist]
|
|
118
|
+
runs-on: ubuntu-latest
|
|
119
|
+
permissions:
|
|
120
|
+
id-token: write
|
|
121
|
+
steps:
|
|
122
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
123
|
+
with:
|
|
124
|
+
pattern: wheels-*
|
|
125
|
+
merge-multiple: true
|
|
126
|
+
path: dist/
|
|
127
|
+
|
|
128
|
+
- name: Publish to PyPI
|
|
129
|
+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # release/v1
|
|
130
|
+
with:
|
|
131
|
+
skip-existing: true
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
|
|
7
|
+
env:
|
|
8
|
+
CARGO_TERM_COLOR: always
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
name: Build (${{ matrix.target }})
|
|
13
|
+
runs-on: ${{ matrix.os }}
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
include:
|
|
17
|
+
- target: x86_64-unknown-linux-gnu
|
|
18
|
+
os: ubuntu-latest
|
|
19
|
+
- target: aarch64-unknown-linux-gnu
|
|
20
|
+
os: ubuntu-latest
|
|
21
|
+
cross: true
|
|
22
|
+
- target: arm-unknown-linux-gnueabihf
|
|
23
|
+
os: ubuntu-latest
|
|
24
|
+
cross: true
|
|
25
|
+
- target: x86_64-apple-darwin
|
|
26
|
+
os: macos-14
|
|
27
|
+
- target: aarch64-apple-darwin
|
|
28
|
+
os: macos-latest
|
|
29
|
+
- target: x86_64-pc-windows-msvc
|
|
30
|
+
os: windows-latest
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
33
|
+
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
|
34
|
+
with:
|
|
35
|
+
targets: ${{ matrix.target }}
|
|
36
|
+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2
|
|
37
|
+
|
|
38
|
+
- name: Install cross
|
|
39
|
+
if: matrix.cross
|
|
40
|
+
run: cargo install cross --locked
|
|
41
|
+
|
|
42
|
+
- name: Build
|
|
43
|
+
run: |
|
|
44
|
+
if [ "${{ matrix.cross }}" = "true" ]; then
|
|
45
|
+
cross build --release --locked --target ${{ matrix.target }}
|
|
46
|
+
else
|
|
47
|
+
cargo build --release --locked --target ${{ matrix.target }}
|
|
48
|
+
fi
|
|
49
|
+
shell: bash
|
|
50
|
+
|
|
51
|
+
- name: Package (Unix)
|
|
52
|
+
if: runner.os != 'Windows'
|
|
53
|
+
run: |
|
|
54
|
+
cd target/${{ matrix.target }}/release
|
|
55
|
+
tar czf ../../../murk-${{ github.ref_name }}-${{ matrix.target }}.tar.gz murk
|
|
56
|
+
|
|
57
|
+
- name: Package (Windows)
|
|
58
|
+
if: runner.os == 'Windows'
|
|
59
|
+
shell: bash
|
|
60
|
+
run: |
|
|
61
|
+
cd target/${{ matrix.target }}/release
|
|
62
|
+
7z a ../../../murk-${{ github.ref_name }}-${{ matrix.target }}.zip murk.exe
|
|
63
|
+
|
|
64
|
+
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
|
65
|
+
with:
|
|
66
|
+
name: murk-${{ matrix.target }}
|
|
67
|
+
path: murk-${{ github.ref_name }}-${{ matrix.target }}.*
|
|
68
|
+
|
|
69
|
+
release:
|
|
70
|
+
name: GitHub Release
|
|
71
|
+
needs: build
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
permissions:
|
|
74
|
+
contents: write
|
|
75
|
+
id-token: write
|
|
76
|
+
attestations: write
|
|
77
|
+
steps:
|
|
78
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
79
|
+
with:
|
|
80
|
+
fetch-depth: 0
|
|
81
|
+
|
|
82
|
+
- name: Generate release notes
|
|
83
|
+
uses: orhun/git-cliff-action@c93ef52f3d0ddcdcc9bd5447d98d458a11cd4f72 # v4
|
|
84
|
+
id: cliff
|
|
85
|
+
with:
|
|
86
|
+
config: cliff.toml
|
|
87
|
+
args: --latest --strip header
|
|
88
|
+
env:
|
|
89
|
+
OUTPUT: CHANGES.md
|
|
90
|
+
|
|
91
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
92
|
+
with:
|
|
93
|
+
merge-multiple: true
|
|
94
|
+
|
|
95
|
+
- name: Checksums
|
|
96
|
+
run: sha256sum murk-* > SHA256SUMS
|
|
97
|
+
|
|
98
|
+
- name: Attest build provenance
|
|
99
|
+
uses: actions/attest-build-provenance@96b4a1ef7235a096b17240c259729fdd70c83d45 # v2
|
|
100
|
+
with:
|
|
101
|
+
subject-path: |
|
|
102
|
+
murk-*
|
|
103
|
+
SHA256SUMS
|
|
104
|
+
|
|
105
|
+
- uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2
|
|
106
|
+
with:
|
|
107
|
+
body_path: CHANGES.md
|
|
108
|
+
files: |
|
|
109
|
+
murk-*
|
|
110
|
+
SHA256SUMS
|
|
111
|
+
|
|
112
|
+
homebrew:
|
|
113
|
+
name: Update Homebrew tap
|
|
114
|
+
needs: release
|
|
115
|
+
runs-on: ubuntu-latest
|
|
116
|
+
steps:
|
|
117
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
118
|
+
|
|
119
|
+
- name: Download checksums
|
|
120
|
+
env:
|
|
121
|
+
GH_TOKEN: ${{ github.token }}
|
|
122
|
+
run: gh release download ${{ github.ref_name }} --pattern SHA256SUMS
|
|
123
|
+
|
|
124
|
+
- name: Render formula
|
|
125
|
+
run: |
|
|
126
|
+
VERSION="${GITHUB_REF_NAME#v}"
|
|
127
|
+
cp .github/formula/murk.rb.template murk.rb
|
|
128
|
+
|
|
129
|
+
for target in x86_64-apple-darwin aarch64-apple-darwin x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu; do
|
|
130
|
+
HASH=$(grep "murk-${{ github.ref_name }}-${target}.tar.gz" SHA256SUMS | awk '{print $1}')
|
|
131
|
+
PLACEHOLDER="__SHA256_$(echo "$target" | tr '[:lower:]-' '[:upper:]_')__"
|
|
132
|
+
sed -i "s/${PLACEHOLDER}/${HASH}/" murk.rb
|
|
133
|
+
done
|
|
134
|
+
|
|
135
|
+
sed -i "s/__VERSION__/${VERSION}/" murk.rb
|
|
136
|
+
cat murk.rb
|
|
137
|
+
|
|
138
|
+
- name: Push to tap
|
|
139
|
+
env:
|
|
140
|
+
TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
|
|
141
|
+
run: |
|
|
142
|
+
git clone https://x-access-token:${TAP_TOKEN}@github.com/iicky/homebrew-murk.git tap
|
|
143
|
+
mkdir -p tap/Formula
|
|
144
|
+
cp murk.rb tap/Formula/murk.rb
|
|
145
|
+
cd tap
|
|
146
|
+
git config user.name "github-actions[bot]"
|
|
147
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
148
|
+
git add Formula/murk.rb
|
|
149
|
+
git commit -m "murk ${GITHUB_REF_NAME}"
|
|
150
|
+
git push
|
|
151
|
+
|
|
152
|
+
publish:
|
|
153
|
+
name: Publish to crates.io
|
|
154
|
+
needs: build
|
|
155
|
+
runs-on: ubuntu-latest
|
|
156
|
+
steps:
|
|
157
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
158
|
+
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
|
|
159
|
+
- run: |
|
|
160
|
+
cargo publish 2>&1 | tee /tmp/publish.log || {
|
|
161
|
+
if grep -q "already uploaded" /tmp/publish.log; then
|
|
162
|
+
echo "Version already published"
|
|
163
|
+
else
|
|
164
|
+
exit 1
|
|
165
|
+
fi
|
|
166
|
+
}
|
|
167
|
+
env:
|
|
168
|
+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|