Skip to content

Commit a1bcdea

Browse files
committed
Feat: automated release on git
1 parent d59a1b2 commit a1bcdea

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed

.github/workflows/release.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
build:
13+
name: Build ${{ matrix.os }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
include:
18+
- os: ubuntu-latest
19+
artifact_name: musical-joycons
20+
asset_name: musical-joycons-linux-amd64
21+
- os: windows-latest
22+
artifact_name: musical-joycons.exe
23+
asset_name: musical-joycons-windows-amd64.exe
24+
- os: macos-latest
25+
artifact_name: musical-joycons
26+
asset_name: musical-joycons-macos-amd64
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Install system dependencies (Linux)
32+
if: matrix.os == 'ubuntu-latest'
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y libudev-dev libusb-1.0-0-dev pkg-config
36+
37+
- name: Install Rust toolchain
38+
uses: dtolnay/rust-toolchain@stable
39+
40+
- name: Build
41+
run: cargo build --release
42+
43+
- name: Run tests
44+
run: cargo test --release
45+
46+
- name: Prepare binary
47+
shell: bash
48+
run: |
49+
mkdir -p release
50+
if [ "${{ matrix.os }}" = "windows-latest" ]; then
51+
cp target/release/musicalJoycons.exe release/${{ matrix.asset_name }}
52+
else
53+
cp target/release/musicalJoycons release/${{ matrix.asset_name }}
54+
fi
55+
56+
- name: Upload binary
57+
uses: actions/upload-artifact@v3
58+
with:
59+
name: ${{ matrix.asset_name }}
60+
path: release/${{ matrix.asset_name }}
61+
62+
create_release:
63+
needs: build
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: Download artifacts
67+
uses: actions/download-artifact@v3
68+
69+
- name: Create Release
70+
id: create_release
71+
uses: softprops/action-gh-release@v1
72+
with:
73+
files: |
74+
musical-joycons-linux-amd64
75+
musical-joycons-windows-amd64.exe
76+
musical-joycons-macos-amd64
77+
draft: false
78+
prerelease: false
79+
generate_release_notes: true
80+
env:
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Changelog
2+
3+
All notable changes to Musical-Joycons will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.1.0] - 2025-01-05
9+
### Added
10+
- Initial release
11+
- Core JoyCon communication layer
12+
- Basic MIDI parsing and transformation
13+
- Support for haptic feedback
14+
- Multi-platform support (Windows, Linux, MacOS)
15+
- Dual JoyCon support with synchronized playback

0 commit comments

Comments
 (0)