-
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
exti0p
committed
Jul 20, 2022
0 parents
commit 460df12
Showing
17 changed files
with
1,835 additions
and
0 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,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: cargo | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 |
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,127 @@ | ||
name: git2mail release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
env: | ||
GITHUB_REF: "${{ github.ref }}" | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
build: [linux, macos, windows] | ||
include: | ||
- build: linux | ||
os: ubuntu-latest | ||
target: x86_64-unknown-linux-musl | ||
cargo_build: --target x86_64-unknown-linux-musl | ||
- build: macos | ||
os: macos-latest | ||
- build: windows | ||
os: windows-latest | ||
extension: .exe | ||
|
||
runs-on: ${{matrix.os}} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: If target is musl, install musl-tools (including musl-gcc) and set target | ||
if: matrix.target == 'x86_64-unknown-linux-musl' | ||
run: | | ||
sudo apt update | ||
sudo apt install musl-tools -y | ||
rustup target add ${{ matrix.target }} | ||
- name: Build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release --all-features --package git2mail --verbose ${{ matrix.cargo_build }} | ||
- name: Strip resulting binary | ||
if: matrix.build == 'linux' | ||
run: strip ./target/${{ matrix.target }}/release/git2mail${{ matrix.extension }} | ||
- name: Upload resulting 'git2mail' | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: git2mail-${{ matrix.build }} | ||
path: ./target/${{ matrix.target }}/release/git2mail${{ matrix.extension }} | ||
|
||
release: | ||
# From https://github.com/cloudflare/wrangler/blob/master/.github/workflows/release.yml | ||
name: GitHub Release | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Query version number | ||
id: get_version | ||
shell: bash | ||
run: | | ||
echo "using version tag ${GITHUB_REF:15}" | ||
echo ::set-output name=version::"${GITHUB_REF:15}" | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Get Changelog Entry | ||
id: changelog_reader | ||
uses: mindsers/changelog-reader-action@v2 | ||
with: | ||
path: CHANGELOG.md | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: git2mail-${{ steps.get_version.outputs.VERSION }} | ||
release_name: git2mail-${{ steps.get_version.outputs.VERSION }} | ||
body: ${{ steps.changelog_reader.outputs.changes }} | ||
draft: true | ||
|
||
- name: Download Linux artifact | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: git2mail-linux | ||
|
||
- name: Download Windows artifact | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: git2mail-windows | ||
|
||
- name: Download MacOS artifact | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: git2mail-macos | ||
|
||
- name: Release Linux artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./git2mail-linux/git2mail | ||
asset_content_type: application/octet-stream | ||
asset_name: git2mail-linux-static-${{ steps.get_version.outputs.VERSION }} | ||
|
||
- name: Release Windows artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./git2mail-windows/git2mail.exe | ||
asset_content_type: application/octet-stream | ||
asset_name: git2mail-windows-${{ steps.get_version.outputs.VERSION }} | ||
|
||
- name: Release MacOS artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./git2mail-macos/git2mail | ||
asset_content_type: application/octet-stream | ||
asset_name: git2mail-macos-${{ steps.get_version.outputs.VERSION }} |
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,38 @@ | ||
name: Ensure repository healthy state over time | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
changelog-format: | ||
# Ensure CHANGELOG respect the KeepAChangelog format | ||
strategy: | ||
matrix: | ||
changelog: [git2mail] | ||
include: | ||
- changelog: git2mail | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get ${{ matrix.changelog }} Changelog Entry | ||
uses: mindsers/changelog-reader-action@v2 | ||
id: changelog_reader | ||
with: | ||
# Check format for the last 10 entries | ||
validation_depth: 10 | ||
path: CHANGELOG.md | ||
- name: Information | ||
run: | | ||
echo -e "\e[1mVersion\e[0m ${{ steps.changelog_reader.outputs.version }}" | ||
echo -e "\e[1mStatus\e[0m ${{ steps.changelog_reader.outputs.status }}" | ||
echo -en "\e[1mBody\e[0m" | ||
cat << 'EOF' | ||
${{ steps.changelog_reader.outputs.changes }} | ||
EOF |
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,79 @@ | ||
name: Build & test | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
build: [linux, macos, windows] | ||
include: | ||
- build: linux | ||
os: ubuntu-latest | ||
- build: macos | ||
os: macos-latest | ||
- build: windows | ||
os: windows-latest | ||
extension: .exe | ||
|
||
runs-on: ${{matrix.os}} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: Build | ||
env: | ||
RUSTFLAGS: -D warnings | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release --all-features --all --verbose | ||
- name: Run tests | ||
run: cargo test --all --release --verbose | ||
- name: Upload resulting 'git2mail' | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: ${{ matrix.build }} | ||
path: ./target/release/git2mail${{ matrix.extension }} | ||
|
||
fmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
components: rustfmt | ||
- name: Check format | ||
run: cargo fmt --all -- --check | ||
|
||
audit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Security audit | ||
uses: actions-rs/audit-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
clippy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
components: clippy | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: -- -D warnings |
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,17 @@ | ||
# Cargo.lock remove | ||
Cargo.lock | ||
|
||
# personal tokens | ||
tokens.json | ||
|
||
# build directory | ||
/target | ||
|
||
# keep .gitkeep | ||
!.gitkeep | ||
|
||
# results directory | ||
results/keyword | ||
results/query | ||
results/repository | ||
results/profile |
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,40 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [0.3.3] - 2022-07-20 | ||
|
||
### Fixed | ||
|
||
- Dependencies update | ||
|
||
## [0.3.1] - 2022-07-18 | ||
|
||
### Fixed | ||
|
||
- Profile fetching minor fixes | ||
|
||
## [0.3.0] - 2022-07-16 | ||
|
||
### Added | ||
|
||
- Get emails from a GitHub profile | ||
- Unauthenticated requests added | ||
- CI/CD workflow implemented | ||
- Documentation from `cargo` generated | ||
|
||
### Fixed | ||
|
||
- Code quality improved | ||
|
||
## [0.2.0] - 2022-06-08 | ||
|
||
### Added | ||
|
||
- Get emails from a GitHub repository | ||
- Aggregate repositories from a metadata search to retrieve their author emails | ||
- Parse author from several GitHub repository URLs formats | ||
- Parse repository from several GitHub repository URLs formats |
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 @@ | ||
This project uses [Rust's Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct). In the forums, every community member must follow the rules and values expressed there. Please open an issue to report any instance of misconduct. |
Oops, something went wrong.