Skip to content

Commit b83cd67

Browse files
committed
Revert "aaaa"
This reverts commit 3af2385.
1 parent 3af2385 commit b83cd67

File tree

5 files changed

+168
-0
lines changed

5 files changed

+168
-0
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Bug report
2+
description: Create a report to help us improve
3+
title: '[Bug]: '
4+
labels: [ 'bug' ]
5+
body:
6+
- type: textarea
7+
id: description
8+
attributes:
9+
label: Describe the bug
10+
description: A clear and concise description of what the bug is.
11+
validations:
12+
required: true
13+
- type: textarea
14+
id: reproduce
15+
attributes:
16+
label: Reproduction steps
17+
description: Steps to reproduce the behavior
18+
validations:
19+
required: true
20+
- type: textarea
21+
id: expected
22+
attributes:
23+
label: Expected behavior
24+
description: A clear and concise description of what you expected to happen.
25+
validations:
26+
required: true
27+
- type: textarea
28+
id: screenshots
29+
attributes:
30+
label: Screenshots
31+
description: If applicable, add screenshots to help explain your issue.
32+
validations:
33+
required: true
34+
- type: textarea
35+
id: environment
36+
attributes:
37+
label: Environment
38+
description: Fill in the information about the environment you're running the project on.
39+
value: |
40+
- Device: [e.g. Mac M1]
41+
- OS: [e.g. macOS 13.3.1]
42+
- Project Version: [e.g. 1.0.0]
43+
validations:
44+
required: true
45+
- type: textarea
46+
id: context
47+
attributes:
48+
label: Additional context
49+
description: Add any other context about the problem here.
50+
validations:
51+
required: false

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: rsmanuf CI (Lint & Test)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_run:
8+
workflows: ["Update manufacturer file"]
9+
types: [completed]
10+
11+
jobs:
12+
lint-test:
13+
name: Lint & Test
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout source code
17+
uses: actions/checkout@v4
18+
- name: Run rustfmt
19+
run: cargo fmt --all -- --check --verbose
20+
- name: Run Clippy
21+
run: cargo clippy --all-targets --all-features
22+
- name: Build
23+
run: cargo build --all --no-default-features --all-features
24+
- name: Test
25+
run: cargo test --all --no-default-features --all-features

.github/workflows/monthly-release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Monthly Release
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 1 * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Repository
13+
uses: actions/checkout@v4
14+
- name: Set Version Variables
15+
run: echo "VERSION=$(date +'%-Y.%-m.%-d')" >> $GITHUB_ENV
16+
- name: Set Release Date
17+
run: echo "RELEASE_DATE=$(date +'%-B %-Y')" >> $GITHUB_ENV
18+
- name: Update Cargo.toml Version
19+
run: sed -i 's/^version = ".*"/version = "'"$VERSION"'"/' Cargo.toml
20+
- name: Commit and Push Changes
21+
run: |
22+
git config --global user.name 'github-actions[bot]'
23+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
24+
git add Cargo.toml
25+
git commit -am "chore: Bump version to $VERSION"
26+
git push
27+
- name: Create GitHub Release
28+
uses: softprops/action-gh-release@v2
29+
with:
30+
tag_name: v${{ env.VERSION }}
31+
name: Version ${{ env.VERSION }}
32+
body: "## ${{ env.RELEASE_DATE }} Update"
33+
draft: false
34+
prerelease: false
35+
make_latest: true

.github/workflows/publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: rsmanuf CD (Publish)
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
workflow_run:
8+
workflows: ["Monthly Release"]
9+
types: [completed]
10+
workflow_dispatch:
11+
12+
jobs:
13+
publish:
14+
name: Publish
15+
runs-on: ubuntu-latest
16+
if: >
17+
github.event_name == 'workflow_dispatch' ||
18+
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
19+
steps:
20+
- name: Checkout source code
21+
uses: actions/checkout@v4
22+
- name: Publish
23+
run: cargo publish --verbose --all-features --token ${{ secrets.CARGO_TOKEN }}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Update manufacturer file
2+
3+
on:
4+
schedule:
5+
- cron: "0 */12 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
update_manufacturer_file:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout source code
13+
uses: actions/checkout@v4
14+
- name: Setup Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.11"
18+
- name: Install Python packages
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install -r tools/requirements.txt
22+
- name: Make manufacturer file
23+
run: python tools/make-manuf.py
24+
- name: Check if there are any changes
25+
id: verify_diff
26+
run: |
27+
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
28+
- name: Update manufacturer file
29+
if: steps.verify_diff.outputs.changed == 'true'
30+
run: |
31+
git config --global user.name 'github-actions[bot]'
32+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
33+
git commit -am "manuf: Update of `date +'%Y-%m-%d %H:%M:%S'`"
34+
git push

0 commit comments

Comments
 (0)