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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
temp
temp
.idea
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name = "codeanalyzer-rs"
version = "0.1.0"
edition = "2021"
authors = ["Rithul Kamesh <hi@rithul.dev>"]
description = "A code analysis tool written in Rust"
authors = ["Rithul Kamesh <hi@rithul.dev>", "Rahul Krishna <i.m.ralk@gmail.com>"]
description = "A code analysis tool written in Rust for Rust"
license = "Apache-2.0"
repository = "https://github.com/codellm-devkit/codeanalyzer-rs"
readme = "README.md"
Expand Down
66 changes: 66 additions & 0 deletions src/.github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Rust Release

on:
push:
tags:
- "v*.*.*"

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

- name: Cache dependencies
uses: Swatinem/rust-cache@v2

- name: Build and Test
id: build
continue-on-error: true # Allow the workflow to continue if this fails
run: |
cargo build --release
cargo test --release

- name: Delete tag on failure
if: steps.build.outcome != 'success'
run: |
git push --delete origin ${GITHUB_REF#refs/tags/}
exit 1 # Fail the workflow

- name: Build Changelog
id: gen_changelog
uses: mikepenz/release-changelog-builder-action@v5
with:
failOnError: "true"
configuration: .github/workflows/release_config.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Package Release Assets
run: |
cd target/release
# For Linux
tar -czf ../../my-app-linux.tar.gz my-app
# For Windows (if cross-compilation is set up)
# zip ../../my-app-windows.zip my-app.exe
cd ../..

- name: Publish Release
uses: softprops/action-gh-release@v1
with:
files: |
my-app-linux.tar.gz
# my-app-windows.zip
body: ${{ steps.gen_changelog.outputs.changelog }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 changes: 35 additions & 0 deletions src/.github/workflows/release_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"categories": [
{
"title": "## 🚀 Features",
"labels": ["kind/feature", "enhancement"]
},
{
"title": "## 🐛 Fixes",
"labels": ["fix", "bug"]
},
{
"title": "## ♻️ Refactoring",
"labels": ["refactoring"]
},
{
"title": "## ⚡️ Performance Improvements",
"labels": ["performance"]
},
{
"title": "## \uD83D\uDCDA Documentation",
"labels": ["documentation", "doc"]
},
{
"title": "## \uD83D\uDEA6 Tests",
"labels": ["test"]
},
{
"title": "## \uD83D\uDEE0 Other Updates",
"labels": ["other", "kind/dependency-change"]
}
],
"ignore_labels": [
"ignore"
]
}