Skip to content

Commit 5cb3427

Browse files
committed
chore: initial commit
0 parents  commit 5cb3427

File tree

22 files changed

+4132
-0
lines changed

22 files changed

+4132
-0
lines changed

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[unstable]
2+
bindeps = true

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
open-pull-requests-limit: 3
8+
groups:
9+
all-dependencies:
10+
patterns:
11+
- "*"
12+
13+
- package-ecosystem: "github-actions"
14+
directory: "/"
15+
schedule:
16+
interval: "monthly"

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
test:
14+
name: Test
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: checkout code
18+
uses: actions/checkout@v5
19+
20+
- name: configure git for private repos
21+
run: |
22+
git config --global url."https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "ssh://[email protected]/"
23+
mkdir -p ~/.cargo
24+
echo '[net]' >> ~/.cargo/config.toml
25+
echo 'git-fetch-with-cli = true' >> ~/.cargo/config.toml
26+
27+
- name: install rust toolchain
28+
uses: dtolnay/rust-toolchain@nightly
29+
with:
30+
targets: x86_64-unknown-uefi, x86_64-unknown-linux-musl
31+
components: clippy, rustfmt
32+
33+
- name: cache rust toolchain
34+
uses: Swatinem/rust-cache@v2
35+
36+
- name: cargo deny
37+
uses: EmbarkStudios/cargo-deny-action@v2
38+
39+
- name: cargo fmt
40+
run: cargo fmt --all -- --check
41+
42+
- name: cargo clippy
43+
run: cargo clippy --target x86_64-unknown-uefi --bins -- -D warnings
44+
45+
- name: cargo build
46+
run: |
47+
cargo build --release --target x86_64-unknown-linux-musl
48+
49+
- name: upload artifacts
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: uefi-reset
53+
path: target/x86_64-unknown-linux-musl/release/dispatch

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
name: Create Release
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: checkout code
17+
uses: actions/checkout@v5
18+
19+
- name: configure git for private repos
20+
run: |
21+
git config --global url."https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "ssh://[email protected]/"
22+
mkdir -p ~/.cargo
23+
echo '[net]' >> ~/.cargo/config.toml
24+
echo 'git-fetch-with-cli = true' >> ~/.cargo/config.toml
25+
26+
- name: install rust toolchain
27+
uses: dtolnay/rust-toolchain@nightly
28+
with:
29+
targets: x86_64-unknown-uefi, x86_64-unknown-linux-musl
30+
31+
- name: cache rust toolchain
32+
uses: Swatinem/rust-cache@v2
33+
34+
- name: cargo build
35+
run: cargo build --release --target x86_64-unknown-linux-musl
36+
37+
- name: create release
38+
env:
39+
GH_TOKEN: ${{ github.token }}
40+
run: |
41+
gh release delete --yes ${{ github.ref_name }} || true
42+
gh release create --generate-notes ${{ github.ref_name }} target/x86_64-unknown-linux-musl/release/dispatch
43+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target/

0 commit comments

Comments
 (0)