-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
91 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Build and Publish Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
env: | ||
ARTIFACT_NAME: "fsenc" | ||
|
||
jobs: | ||
build: | ||
name: Build on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 'stable' | ||
|
||
- name: Build project | ||
shell: bash | ||
run: | | ||
if [ "${{ matrix.os }}" = "windows-latest" ]; then | ||
go build -o ${{ env.ARTIFACT_NAME }}.exe | ||
else | ||
go build -o ${{ env.ARTIFACT_NAME }} | ||
fi | ||
- name: Install 7zip (Windows) | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
choco install 7zip | ||
- name: Archive production artifacts | ||
shell: bash | ||
run: | | ||
if [ "${{ matrix.os }}" = "windows-latest" ]; then | ||
7z a ${{ env.ARTIFACT_NAME }}.zip ./${{ env.ARTIFACT_NAME }}.exe | ||
else | ||
tar -czvf ${{ env.ARTIFACT_NAME }}.tar.gz ./${{ env.ARTIFACT_NAME }} | ||
fi | ||
- name: Upload production artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ runner.os }}-artifact | ||
retention-days: 1 | ||
path: | | ||
${{ env.ARTIFACT_NAME }}${{ matrix.os == 'windows-latest' && '.zip' || '.tar.gz' }} | ||
- run: ls -R | ||
|
||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Download all artifacts | ||
uses: actions/download-artifact@v4 | ||
|
||
- run: ls -R | ||
|
||
- name: Upload Artifacts to Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: './*-artifact/*' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
# fs-enc | ||
CLI tool to encrypt and decrypt files with passphrase | ||
# FSENC | ||
FSENC is a lightweight, command-line interface tool designed for encrypting and decrypting files using a passphrase. It's an ideal solution for those who need to secure individual files containing sensitive information without the overhead of encrypting their entire filesystem. | ||
|
||
## Why? | ||
### Download from [Releases](https://github.com/nomionz/test/releases/) | ||
|
||
One of my use cases is to encrypt files stored in the **home** directory that may contain sensitive information. | ||
## Why FSENC? | ||
|
||
I don't need to encrypt the whole file system, just a couple of files. | ||
- Selective Encryption: Perfect for encrypting specific files in your home directory or any other location, ensuring sensitive information is kept private. | ||
- Ease of Use: A straightforward CLI tool, making file encryption and decryption as simple as a single command. | ||
- Security: Uses robust encryption algorithms to secure your files, safeguarding them against unauthorized access. | ||
|
||
## Usage | ||
|
||
## Encrypt | ||
## Encrypting a File | ||
To encrypt a file, use the enc command followed by the file path and a passphrase of your choice: | ||
```bash | ||
fs-enc enc <filepath> <passphrase> | ||
fsenc enc <filepath> <passphrase> | ||
``` | ||
|
||
## Decrypt | ||
## Decrypting a File | ||
To decrypt an encrypted file, use the dec command followed by the file path and the correct passphrase: | ||
```bash | ||
fs-enc dec <filepath> <passphrase> | ||
fsenc dec <filepath> <passphrase> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module github.com/nomionz/fs-enc | ||
|
||
go 1.21.2 | ||
go 1.21 | ||
|
||
require golang.org/x/crypto v0.18.0 | ||
|
||
|