Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ jobs:
git clone https://github.com/FiloSottile/passage
sudo make -C passage install PREFIX=/usr/local
- name: Build plugin binary
run: cargo build -p age-plugin-argon2-cli
run: cargo build -p age-plugin-argon2
- name: Run e2e tests
run: cargo test -p age-plugin-argon2-cli --features e2e --test e2e
run: cargo test -p age-plugin-argon2 --features e2e --test e2e

deny:
runs-on: ubuntu-latest
Expand Down
70 changes: 68 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release

on:
push:
tags: ["age-plugin-argon2-v*"]
tags: ["v*"]

permissions:
contents: write
Expand All @@ -11,7 +11,60 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Build ${{ matrix.target }}
strategy:
matrix:
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2

- name: Install musl tools
if: matrix.target == 'x86_64-unknown-linux-musl'
run: sudo apt-get install -y musl-tools

- name: Build
run: cargo build -p age-plugin-argon2 --release --target ${{ matrix.target }}

- name: Package (Unix)
if: runner.os != 'Windows'
run: |
VERSION="${GITHUB_REF_NAME#age-plugin-argon2-}"
ARCHIVE="age-plugin-argon2-${VERSION}-${{ matrix.target }}.tar.gz"
tar czf "$ARCHIVE" -C "target/${{ matrix.target }}/release" age-plugin-argon2
echo "ARCHIVE=$ARCHIVE" >> "$GITHUB_ENV"

- name: Package (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$version = $env:GITHUB_REF_NAME -replace '^age-plugin-argon2-', ''
$archive = "age-plugin-argon2-${version}-${{ matrix.target }}.zip"
Compress-Archive `
-Path "target/${{ matrix.target }}/release/age-plugin-argon2.exe" `
-DestinationPath $archive
echo "ARCHIVE=$archive" | Out-File -FilePath $env:GITHUB_ENV -Append

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: ${{ env.ARCHIVE }}

publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -26,7 +79,20 @@ jobs:
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

release:
needs: [build, publish]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true

- name: Create GitHub release
run: gh release create "${{ github.ref_name }}" --generate-notes
run: |
gh release create "${{ github.ref_name }}" \
--repo "${{ github.repository }}" \
--generate-notes \
artifacts/*
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 4 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[workspace]
members = ["age-plugin-argon2", "age-plugin-argon2-cli"]
members = ["age-plugin-argon2"]
resolver = "2"
33 changes: 0 additions & 33 deletions age-plugin-argon2-cli/Cargo.toml

This file was deleted.

13 changes: 13 additions & 0 deletions age-plugin-argon2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,21 @@ readme = "../README.md"
categories = ["cryptography", "authentication"]
keywords = ["age", "argon2", "encryption", "password", "plugin"]

[features]
e2e = []

[[test]]
name = "e2e"
required-features = ["e2e"]

[dependencies]
age-core = "0.11"
age = "0.11"
age-plugin = "0.6"
argon2 = { version = "0.5", features = ["std"] }
bech32 = "0.9"
chacha20poly1305 = "0.10"
clap = { version = "4", features = ["derive"] }
rand = { version = "0.8", features = ["std_rng"] }
base64 = "0.22"
uuid = { version = "1", features = ["v4"] }
Expand All @@ -28,3 +38,6 @@ thiserror = "1.0"
[dev-dependencies]
serde_json = "1.0"
tempfile = "3"

[target.'cfg(unix)'.dev-dependencies]
rexpect = "0.6"
File renamed without changes.
Loading