Update all the GitHub Actions config
- ID
3a9c194- date
2024-06-03 20:56:59+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
a863e2c- message
Update all the GitHub Actions config- changed files
4 files, 50 additions, 31 deletions
Changed files
.github/workflows/build.yml (514) → .github/workflows/build.yml (0)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
deleted file mode 100644
index ad4367f..0000000
--- a/.github/workflows/build.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-on: [push, pull_request]
-name: build
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- - name: build
- uses: actions-rs/cargo@v1
- with:
- command: build
- - name: test
- uses: actions-rs/cargo@v1
- with:
- command: test
- - name: check formatting
- uses: actions-rs/cargo@v1
- with:
- command: fmt
- args: --check
.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 (732) → .github/workflows/upload_binaries.yml (1116)
diff --git a/.github/workflows/upload_binaries.yml b/.github/workflows/upload_binaries.yml
index 7e81835..0a31145 100644
--- a/.github/workflows/upload_binaries.yml
+++ b/.github/workflows/upload_binaries.yml
@@ -9,7 +9,7 @@ jobs:
create-release:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
changelog: CHANGELOG.md
@@ -19,17 +19,28 @@ jobs:
upload-assets:
strategy:
matrix:
- os:
- - ubuntu-latest
- - macos-latest
- - windows-latest
- runs-on: ${{ matrix.os }}
+ 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' }}
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: taiki-e/upload-rust-binary-action@v1
with:
+ target: ${{ matrix.target }}
bin: brightness_adjust
- tar: unix
+ tar: all
zip: windows
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONTRIBUTING.md (0) → CONTRIBUTING.md (355)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..be23ab5
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,11 @@
+# CONTRIBUTING
+
+## Releasing a new version
+
+1. Bump the version number in `Cargo.toml`
+2. Create a new changelog entry for your version in `CHANGELOG.md`
+3. Commit your change
+4. Create a Git tag with your version number
+5. Push your new commit and Git tag to GitHub
+
+GitHub Actions will then build and release a new version of the CLI tool for you.