-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from clog-tool/gh-actions
Migrate to GH Actions
- Loading branch information
Showing
10 changed files
with
209 additions
and
188 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,56 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
|
||
concurrency: | ||
group: ci-pr-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test-full: | ||
name: Full | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
rust: [stable] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Install rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
- name: Cache Builds | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Compile | ||
run: cargo test --no-run --all-features | ||
- name: Test | ||
run: cargo test --all-features | ||
test-minimal: | ||
name: Min | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
rust: [stable] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Install rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
- name: Cache Builds | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Compile | ||
run: cargo test --no-run --no-default-features | ||
- name: Test | ||
run: cargo test --no-default-features |
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,43 @@ | ||
name: Lint | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Check spelling | ||
uses: crate-ci/typos@master | ||
with: | ||
config: ./.typos.toml | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: nightly | ||
components: rustfmt, clippy | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Clippy | ||
run: cargo clippy --all-features --all-targets | ||
|
||
- name: Format Check | ||
run: cargo fmt --check | ||
msrv: | ||
name: MSRV | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: 1.74.1 # msrv | ||
|
||
- name: Check | ||
run: cargo check |
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,82 @@ | ||
--- | ||
on: | ||
push: | ||
branches: [master, main] | ||
|
||
name: Nightly Release | ||
|
||
env: | ||
RELEASE_BIN: clog | ||
RELEASE_ADDS: >- | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
nightly-CHANGELOG.md | ||
README.md | ||
jobs: | ||
nightly-release: | ||
name: Nightly Release | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
target: x86_64-unknown-linux-musl | ||
|
||
- name: Compile | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release --target x86_64-unknown-linux-musl | ||
|
||
- name: Install CLOG | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: install | ||
args: clog-cli | ||
|
||
- name: Generate Changelog | ||
run: clog -F -o nightly-CHANGELOG.md -i /dev/null | ||
|
||
- name: Make artifacts dir | ||
run: mkdir -p artifacts/ | ||
|
||
- name: Copy all artifacts into dir | ||
run: cp target/x86_64-unknown-linux-musl/release/${{ env.RELEASE_BIN }} ${{ env.RELEASE_ADDS }} artifacts/ | ||
|
||
- uses: benjlevesque/[email protected] | ||
id: short-sha | ||
|
||
- name: Create archive for Linux | ||
run: cd artifacts/ && tar czf ../${{ env.RELEASE_BIN }}-${{ env.SHA }}-x86_64-linux-musl.tar.gz ./* | ||
env: | ||
SHA: ${{ steps.short-sha.outputs.sha }} | ||
|
||
- name: Remove previous Nightly Release | ||
uses: dev-drprasad/[email protected] | ||
with: | ||
delete_release: true | ||
tag_name: nightly | ||
repo: clog-tool/clog-cli | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create Nightly Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: clog Nightly (${{ env.SHA }}) | ||
tag_name: nightly | ||
prerelease: true | ||
body_path: nightly-CHANGELOG.md | ||
files: | | ||
${{ env.RELEASE_BIN }}-${{ env.SHA }}-x86_64-linux-musl.tar.gz | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_REPOSITORY: clog-tool/clog-cli | ||
SHA: ${{ steps.short-sha.outputs.sha }} | ||
|
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 @@ | ||
--- | ||
on: | ||
push: | ||
paths: | ||
- '**/Cargo.toml' | ||
- '**/Cargo.lock' | ||
|
||
name: Security audit | ||
|
||
jobs: | ||
security_audit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/audit-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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,3 @@ | ||
[type.md.extend-words] | ||
ba = "ba" | ||
afe = "afe" |
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 |
---|---|---|
|
@@ -6,6 +6,7 @@ license = "MIT" | |
name = "clog-cli" | ||
edition = "2021" | ||
version = "0.9.3" | ||
rust-version = "1.74.1" # msrv | ||
authors = ["Christoph Burgdorf <[email protected]>"] | ||
description = "A conventional changelog for the rest of us" | ||
exclude = ["docs/*"] | ||
|
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
Oops, something went wrong.