Skip to content

Commit 01743f4

Browse files
committed
feat: rewrite application with UI support
1 parent 3d3d9cf commit 01743f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+8336
-2882
lines changed

.github/workflows/release.yml

+85-4
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,106 @@ jobs:
4141
- run: sudo apt-get install libdbus-1-dev libssl-dev libxdo-dev
4242
- run: cargo clippy -- -D warnings
4343

44-
release:
45-
needs: [check, fmt, clippy]
46-
name: Semantic Release
44+
check-release:
45+
needs: [ check, fmt, clippy ]
46+
name: Check Release
4747
runs-on: ubuntu-latest
4848
if: github.actor != 'sbosnick-bot'
4949

50+
outputs:
51+
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
52+
new_release_version: ${{ steps.semantic.outputs.new_release_version }}
53+
5054
steps:
5155
- name: Checkout
5256
uses: actions/checkout@v3
5357
with:
5458
fetch-depth: 0
5559
persist-credentials: false
5660

61+
- name: Semantic Release
62+
uses: cycjimmy/semantic-release-action@v4
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
id: semantic
66+
with:
67+
dry_run: true
68+
69+
build:
70+
needs: [ check-release ]
71+
if: needs.check-release.outputs.new_release_published == 'true'
72+
runs-on: ubuntu-latest
73+
74+
strategy:
75+
matrix:
76+
target: [ linux-x64, windows-x64 ]
77+
78+
steps:
79+
- name: Checkout
80+
uses: actions/checkout@v3
81+
5782
- name: Install Rust Stable
5883
uses: dtolnay/rust-toolchain@stable
5984

6085
- run: sudo apt-get install libdbus-1-dev libssl-dev libxdo-dev
6186

87+
- name: Update version
88+
run: |
89+
sed -i '/\[package\]/,/^version = "[^"]*"$/ s/^version = "[^"]*"$/version = "'"${{ needs.check-release.outputs.new_release_version }}"'"/' Cargo.toml
90+
cargo update --package vrc-osc-manager
91+
shell: bash
92+
93+
- name: Build Binary
94+
run: |
95+
if [ "${{ matrix.target }}" == "linux-x64" ]; then
96+
cargo build --release --target x86_64-unknown-linux-gnu
97+
cp target/x86_64-unknown-linux-gnu/release/vrc-osc-manager ./vrc-osc-manager
98+
else
99+
cargo install cross --git https://github.com/rust-embedded/cross
100+
cross build --release --target x86_64-pc-windows-gnu
101+
cp target/x86_64-pc-windows-gnu/release/vrc-osc-manager.exe ./vrc-osc-manager.exe
102+
shell: bash
103+
104+
- name: Upload Binary Artifact
105+
uses: actions/upload-artifact@v3
106+
with:
107+
name: ${{ matrix.target }}-binary
108+
path: |
109+
./vrc-osc-manager
110+
./vrc-osc-manager.exe
111+
112+
semantic-release:
113+
needs: [ build ]
114+
if: needs.check-release.outputs.new_release_published == 'true'
115+
runs-on: ubuntu-latest
116+
117+
steps:
118+
- name: Checkout
119+
uses: actions/checkout@v3
120+
121+
- name: Install Rust Stable
122+
uses: dtolnay/rust-toolchain@stable
123+
124+
- name: Download Binaries
125+
uses: actions/download-artifact@v3
126+
with:
127+
name: linux-x64-binary
128+
path: ./release-artifacts/
129+
130+
- name: Download Windows Binary
131+
uses: actions/download-artifact@v3
132+
with:
133+
name: windows-x64-binary
134+
path: ./release-artifacts/
135+
136+
- name: Update version
137+
run: |
138+
sed -i '/\[package\]/,/^version = "[^"]*"$/ s/^version = "[^"]*"$/version = "'"${{ needs.check-release.outputs.new_release_version }}"'"/' Cargo.toml
139+
cargo update --package vrc-osc-manager
140+
shell: bash
141+
62142
- name: Semantic Release
63-
uses: cycjimmy/semantic-release-action@v3
143+
uses: cycjimmy/semantic-release-action@v4
64144
env:
65145
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66146
id: semantic
@@ -69,3 +149,4 @@ jobs:
69149
@semantic-release/[email protected]
70150
@semantic-release/[email protected]
71151
@semantic-release/[email protected]
152+
@semantic-release/[email protected]

.releaserc.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ plugins:
55
- '@semantic-release/commit-analyzer'
66
- '@semantic-release/release-notes-generator'
77
- '@semantic-release/changelog'
8-
- - '@semantic-release/exec'
9-
- prepareCmd: "./release.sh ${nextRelease.version}"
108
- - '@semantic-release/github'
9+
- assets:
10+
- path: release-artifacts/vrc-osc-manager
11+
label: Linux x64 binary
12+
- path: release-artifacts/vrc-osc-manager.exe
13+
label: Windows x64 binary
1114
- - '@semantic-release/git'
1215
- assets:
1316
- CHANGELOG.md

0 commit comments

Comments
 (0)