Skip to content

Commit

Permalink
Merge pull request #287 from noir-cr/dev
Browse files Browse the repository at this point in the history
Release v0.15.0
  • Loading branch information
hahwul committed Apr 29, 2024
2 parents 1fd7b0c + e8ceb9f commit 736de6d
Show file tree
Hide file tree
Showing 45 changed files with 1,321 additions and 150 deletions.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: '🐞 bug'
assignees: hahwul, ksg97031

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Run this '...'
2. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Versions**
- OS: [e.g. macos, linux]
- Version [e.g. v0.15.0]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: '💡 enhancement'
assignees: hahwul, ksg97031

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
84 changes: 37 additions & 47 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,48 @@

---
🔬 analyzer:
- changed-files:
- any-glob-to-any-file:
- src/analyzer/**
- src/models/analyzer.cr

- changed-files:
- any-glob-to-any-file: [src/analyzer/**, src/models/analyzer.cr]
💌 deliver:
- changed-files:
- any-glob-to-any-file:
- src/deliver/**
- src/models/deliver.cr

- changed-files:
- any-glob-to-any-file: [src/deliver/**, src/models/deliver.cr]
🔎 detector:
- changed-files:
- any-glob-to-any-file:
- src/detector/**
- src/models/detector.cr

- changed-files:
- any-glob-to-any-file: [src/detector/**, src/models/detector.cr]
🥢 mini-lexer:
- changed-files:
- any-glob-to-any-file:
- src/minilexers/**
- src/models/minilexer/**

- changed-files:
- any-glob-to-any-file:
- src/minilexers/**
- src/models/minilexer/**
- src/miniparsers/**
📦 output-builder:
- changed-files:
- any-glob-to-any-file:
- src/output_builder/**
- src/models/output_builder.cr

- changed-files:
- any-glob-to-any-file:
- src/output_builder/**
- src/models/output_builder.cr
🏷️ tagger:
- changed-files:
- any-glob-to-any-file:
- src/taggers/**
- src/models/tag.cr

- changed-files:
- any-glob-to-any-file: [src/tagger/**, src/models/tag.cr]
💊 spec:
- changed-files:
- any-glob-to-any-file: spec/**

- changed-files:
- any-glob-to-any-file: spec/**
🦺 github-action:
- changed-files:
- any-glob-to-any-file: .github/workflows/**

- changed-files:
- any-glob-to-any-file: [.github/workflows/**, .github/labeler.yml]
📑 documentation:
- changed-files:
- any-glob-to-any-file: docs/**

- changed-files:
- any-glob-to-any-file:
- docs/**
- README.md
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- LICENSE.md
- SECURITY.md
⚙️ options:
- changed-files:
- any-glob-to-any-file: src/options.cr

- changed-files:
- any-glob-to-any-file: src/options.cr
🛥️ workflow:
- changed-files:
- any-glob-to-any-file:
- .github/workflows/**
- .github/labeler.yml
- changed-files:
- any-glob-to-any-file: [.github/workflows/**, .github/labeler.yml]
🐳 docker:
- changed-files:
- any-glob-to-any-file: Dockerfile
45 changes: 39 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,56 @@
---
name: Crystal CI
name: CI
on:
pull_request:
pull_request_target:
branches: [main, dev]
jobs:
build:
build-crystal:
runs-on: ubuntu-latest
strategy:
matrix:
crystal-version: ['1.10.0', '1.11.0']
matrix:
crystal-version: [1.10.1, 1.11.2, 1.12.1]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: MeilCli/setup-crystal-action@v4
with:
crystal_version: ${{ matrix.crystal-version }}
- name: Install dependencies
run: shards install
- name: Build
run: shards build
build-docker:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [linux/amd64, linux/arm64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@v3.1.1
with:
cosign-release: v2.1.1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
- name: Build Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ matrix.arch }}
cache-from: type=gha
cache-to: type=gha,mode=max
lint:
runs-on: ubuntu-latest
container:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/contributors.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
name: Contributors
on:
push:
branches:
- main
branches: [main]
workflow_dispatch:
inputs:
logLevel:
description: 'manual run'
required: false
default: ''
inputs:
logLevel:
description: manual run
required: false
default: ''
jobs:
contributors:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/contributors-list@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
round: true
round: true
35 changes: 18 additions & 17 deletions .github/workflows/ghcr_publish.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
---
name: GHCR Publish

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
push:
branches: [ "main" ]
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]

branches: [main, dev]
tags: [v*.*.*]
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}


jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
arch: [linux/amd64, linux/arm64]
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@v3.1.1
with:
cosign-release: 'v2.1.1'
cosign-release: v2.1.1

# Using QEME for multiple platforms
# https://github.com/docker/build-push-action?tab=readme-ov-file#usage
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
uses: docker/setup-buildx-action@v3

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand All @@ -60,7 +60,7 @@ jobs:
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

Expand All @@ -71,8 +71,9 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ matrix.arch }}
cache-from: type=gha
cache-to: type=gha,mode=max
20 changes: 7 additions & 13 deletions .github/workflows/homebrew_publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
name: Homebrew tab Publish

on:
release:
types: [published]

jobs:
homebrew-releaser:
runs-on: ubuntu-latest
Expand All @@ -15,21 +14,16 @@ jobs:
homebrew_owner: noir-cr
homebrew_tap: homebrew-noir
formula_folder: Formula

github_token: ${{ secrets.NOIR_PUBLISH_TOKEN }}

commit_owner: hahwul
commit_email: hahwul@gmail.com

depends_on: |
"crystal"
"crystal"
install: |
system "shards install"
system "shards build --release --no-debug --production"
bin.install "bin/noir"
test: 'system "{bin}/noir", "-v"'
system "shards install"
system "shards build --release --no-debug --production"
bin.install "bin/noir"
test: system "{bin}/noir", "-v"
update_readme_table: true
skip_commit: false
debug: false
debug: false
9 changes: 4 additions & 5 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: "Pull Request Labeler"
on:
- pull_request

---
name: Pull Request Labeler
on: [pull_request_target]
jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
- uses: actions/labeler@v5
Loading

0 comments on commit 736de6d

Please sign in to comment.