Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

23 new version alpha4 #24

Merged
merged 9 commits into from
Dec 20, 2023
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
17 changes: 11 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:
jobs:
publish:
runs-on: ubuntu-latest
permissions: write-all

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -39,20 +40,24 @@ jobs:
- name: Run tests with all features
run: cargo test --all-features

- name: publish crates dry run
run: |
cargo login ${{ secrets.crates_io }}
cargo publish -p encrypt_config --dry-run
cargo publish -p encrypt_config_derive --dry-run

- name: publish crates
uses: katyo/publish-crates@v2
with:
# crates.io registry token
registry-token: ${{ secrets.crates_io }}
run: |
cargo publish -p encrypt_config
cargo publish -p encrypt_config_derive

- name: Create Tag
uses: actions/github-script@v6
with:
script: |
const {VERSION} = process.env
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/v${VERSION}`,
ref: 'refs/tags/v${{ steps.extract-version.outputs.VERSION }}',
sha: context.sha
})
48 changes: 48 additions & 0 deletions .github/workflows/release_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: ReleaseTest

on:
pull_request:
branches: [release]
types: [opened, synchronize]

env:
CARGO_TERM_COLOR: always

jobs:
publish:
runs-on: ubuntu-latest
permissions: write-all

steps:
- uses: actions/checkout@v3

- name: Extract version
id: extract-version
run: echo "VERSION=$(grep -oP '^version = "\K[^"]+' Cargo.toml | awk '{$1=$1;print}')" >> $GITHUB_OUTPUT

- name: Cache restore
uses: actions/cache/restore@v3
id: cache-cargo-restore
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ steps.extract-version.outputs.VERSION }}

- name: Run clippy
run: cargo clippy --all-features --all-targets -- -D warnings

- name: Run all tests with default features
run: cargo test

- name: Run tests with all features
run: cargo test --all-features

- name: publish crates dry run
run: |
cargo login ${{ secrets.crates_io }}
cargo publish -p encrypt_config --dry-run
cargo publish -p encrypt_config_derive --dry-run
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test

on:
pull_request:
branches: [dev, release]
branches: [dev]
types: [opened, synchronize]

env:
Expand Down
30 changes: 8 additions & 22 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,32 +1,18 @@
[package]
name = "encrypt-config"
[workspace]
members = ["encrypt-config", "encrypt-config-derive", "tests"]
resolver = "2"

[workspace.package]
version = "0.0.1-alpha4"
authors = ["Louis <[email protected]>"]
description = "A rust crate to manage, persist and encrypt your configurations."
license = "MIT"
edition = "2021"
repository = "https://github.com/kingwingfly/encrypt-config"

[dependencies]
snafu = { version = "0.7.5" }
serde = { version = "1", optional = true }
serde_json = { version = "1", optional = true }
rsa = { version = "0.9.6", features = ["serde"] }
keyring = "2.1.0"
dirs-next = { version = "2.0.0", optional = true }
rand = "0.8.5"
encrypt-config-derive = { path = "encrypt-config-derive", version = "0.0.1-alpha4" }

[profile.release]
lto = true
opt-level = 3
codegen-units = 1
[workspace.dependencies]
encrypt_config = { path = "encrypt-config", version = "^0.0.1-alpha3" }
encrypt_config_derive = { path = "encrypt-config-derive", version = "^0.0.1-alpha3" }

[profile.dev]
opt-level = 3

[features]
default = ["serde"]
serde = ["dep:serde", "dep:serde_json"]
default_config_dir = ["dep:dirs-next", "encrypt-config-derive/default_config_dir"]
protobuf = []
242 changes: 0 additions & 242 deletions README.md

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Loading