-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
21 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
name: Windows | ||
|
||
on: | ||
release: | ||
types: [created] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
@@ -14,27 +13,40 @@ jobs: | |
|
||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@master | ||
uses: actions/checkout@v2 | ||
|
||
- name: "Rust" | ||
- name: "Set up Rust" | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
targets: ${{ matrix.target }} | ||
|
||
- name: "Dependencies" | ||
- name: "Install Dependencies" | ||
run: sudo apt-get install -y mingw-w64 libudev-dev zip wine64 | ||
|
||
- name: "Build" | ||
run: cargo build --release --target ${{ matrix.target }} | ||
|
||
- name: "Extract Cargo Package Version" | ||
id: cargo-version | ||
run: echo "CARGO_VERSION=$(grep '^version' Cargo.toml | head -1 | cut -d '\"' -f 2)" >> $GITHUB_ENV | ||
|
||
- name: "Create Git Tag" | ||
run: | | ||
git config --local user.name "GitHub Action" | ||
git config --local user.email "[email protected]" | ||
git tag -a v${{ env.CARGO_VERSION }} -m "Release v${{ env.CARGO_VERSION }}" | ||
git push origin v${{ env.CARGO_VERSION }} | ||
- name: "Zip" | ||
run: | | ||
cp target/${{ matrix.target }}/release/dygma-layer-switcher.exe . | ||
zip dls-${{ github.ref_name }}-${{ matrix.target }}.zip dygma-layer-switcher.exe | ||
zip dls-v${{ env.CARGO_VERSION }}-${{ matrix.target }}.zip dygma-layer-switcher.exe | ||
- name: "Release" | ||
- name: "Create GitHub Release" | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: v${{ env.CARGO_VERSION }} | ||
release_name: v${{ env.CARGO_VERSION }} | ||
files: | | ||
dls-${{ github.ref_name }}-${{ matrix.target }}.zip | ||
dls-v${{ env.CARGO_VERSION }}-${{ matrix.target }}.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "dygma-layer-switcher" | ||
version = "0.1.0" | ||
version = "0.3.4" | ||
edition = "2021" | ||
authors = ["Matthew Wilding <[email protected]>"] | ||
|
||
|