Skip to main content

Add some GitHub Actions config

ID
d00f763
date
2025-01-09 23:46:06+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
67c7977
message
Add some GitHub Actions config
changed files
4 files, 83 additions

Changed files

.github/dependabot.yml (0) → .github/dependabot.yml (245)

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..8793ce4
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,12 @@
+version: 2
+updates:
+  - package-ecosystem: "github-actions"
+    directory: "/"
+    schedule:
+      interval: "daily"
+      time: "09:00"
+  - package-ecosystem: "cargo"
+    directory: "/"
+    schedule:
+      interval: "daily"
+      time: "09:00"

.github/workflows/test.yml (0) → .github/workflows/test.yml (340)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..a208df6
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,20 @@
+on:
+  push:
+    branches:
+    - main
+  pull_request:
+    branches:
+    - main
+name: build
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: dtolnay/rust-toolchain@v1
+        with:
+          toolchain: stable
+
+      - run: cargo build
+      - run: cargo test
+      - run: cargo fmt --check

.github/workflows/upload_binaries.yml (0) → .github/workflows/upload_binaries.yml (1185)

diff --git a/.github/workflows/upload_binaries.yml b/.github/workflows/upload_binaries.yml
new file mode 100644
index 0000000..652c54c
--- /dev/null
+++ b/.github/workflows/upload_binaries.yml
@@ -0,0 +1,50 @@
+name: Release
+
+on:
+  push:
+    tags:
+      - v[0-9]+.*
+
+jobs:
+  create-release:
+    runs-on: ubuntu-latest
+    permissions:
+      contents: write
+    steps:
+      - uses: actions/checkout@v4
+      - uses: taiki-e/create-gh-release-action@v1
+        with:
+          changelog: CHANGELOG.md
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+  upload-assets:
+    strategy:
+      matrix:
+        include:
+          - target: aarch64-unknown-linux-gnu
+          - target: aarch64-unknown-linux-musl
+          - target: x86_64-unknown-linux-gnu
+          - target: x86_64-unknown-linux-musl
+
+          - target: aarch64-apple-darwin
+            os: macos-latest
+          - target: x86_64-apple-darwin
+            os: macos-latest
+
+          - target: x86_64-pc-windows-msvc
+            os: windows-latest
+
+    runs-on: ${{ matrix.os || 'ubuntu-latest' }}
+    permissions:
+      contents: write
+    steps:
+      - uses: actions/checkout@v4
+      - uses: taiki-e/upload-rust-binary-action@v1
+        with:
+          target: ${{ matrix.target }}
+          bin: randline
+          tar: all
+          zip: windows
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md (0) → CHANGELOG.md (11)

diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..505d21d
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1 @@
+# CHANGELOG
\ No newline at end of file