-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix ci ci: add desktop release for aarch64-apple-darwin ci: release artifacts bump version code update release-desktop.yml fix ci fix ci fix ci fix ci fix ci fix ci fix ci fix ci fix ci fix ci
- Loading branch information
Showing
5 changed files
with
152 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,142 @@ | ||
on: | ||
release: | ||
types: [created] | ||
#on: | ||
# push: | ||
# branches: ["master"] | ||
# pull_request: | ||
# # The branches below must be a subset of the branches above | ||
# branches: ["master"] | ||
|
||
jobs: | ||
release: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [macos-latest, ubuntu-20.04, windows-latest] | ||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ matrix.platform }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Install dependencies (mac) only) | ||
if: matrix.platform == 'macos-latest' | ||
run: brew install protobuf | ||
- name: Install dependencies (ubuntu only) | ||
if: matrix.platform == 'ubuntu-20.04' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libasound2-dev protobuf-compiler | ||
- name: Install dependencies (windows only) | ||
if: matrix.platform == 'windows-latest' | ||
run: | | ||
choco install protoc | ||
choco install checksum | ||
- name: Install Node Modules | ||
run: | | ||
cd webui/musicplayer | ||
npm install -g yarn | ||
yarn install --network-timeout 1000000000 | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- name: Install aarch64-apple-darwin toolchain | ||
if: matrix.platform == 'macos-latest' | ||
run: rustup target add aarch64-apple-darwin | ||
- name: Build App | ||
run: | | ||
cd webui/musicplayer | ||
npx @tauri-apps/cli build | ||
- name: Build App (macos arch64-apple-darwin) | ||
if: matrix.platform == 'macos-latest' | ||
run: | | ||
cd webui/musicplayer | ||
npx @tauri-apps/cli build --target aarch64-apple-darwin | ||
- name: List files | ||
if: matrix.platform == 'ubuntu-20.04' || matrix.platform == 'macos-latest' | ||
run: | | ||
ls target/release/bundle/* | ||
- name: List files (windows) | ||
if: matrix.platform == 'windows-latest' | ||
run: | | ||
dir target\release\bundle | ||
dir target\release\bundle\* | ||
- name: Set env | ||
if: matrix.platform == 'ubuntu-20.04' || matrix.platform == 'macos-latest' | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: Create archive (macos) | ||
if: matrix.platform == 'macos-latest' | ||
run: | | ||
cd target/release/bundle | ||
rm -f music-player-desktop_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz | ||
tar -czvf music-player-desktop_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz "macos/Music Player.app" | ||
shasum -a 256 music-player-desktop_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz > music-player-desktop_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz.sha256 | ||
rm -f dmg/Music_Player_${{ env.RELEASE_VERSION }}_x64.dmg | ||
mv dmg/Music\ Player*_x64.dmg dmg/Music_Player_${{ env.RELEASE_VERSION }}_x64.dmg | ||
shasum -a 256 dmg/Music_Player_${{ env.RELEASE_VERSION }}_x64.dmg > dmg/Music_Player_${{ env.RELEASE_VERSION }}_x64.dmg.sha256 | ||
cd ../../aarch64-apple-darwin/release/bundle | ||
rm -f music-player-desktop_${{ env.RELEASE_VERSION }}_aarch64-apple-darwin.tar.gz | ||
tar -czvf music-player-desktop_${{ env.RELEASE_VERSION }}_aarch64-apple-darwin.tar.gz "macos/Music Player.app" | ||
shasum -a 256 music-player-desktop_${{ env.RELEASE_VERSION }}_aarch64-apple-darwin.tar.gz > music-player-desktop_${{ env.RELEASE_VERSION }}_aarch64-apple-darwin.tar.gz.sha256 | ||
rm -f dmg/Music_Player_${{ env.RELEASE_VERSION }}_aarch64.dmg | ||
mv dmg/Music\ Player*_aarch64.dmg dmg/Music_Player_${{ env.RELEASE_VERSION }}_aarch64.dmg | ||
shasum -a 256 dmg/Music_Player_${{ env.RELEASE_VERSION }}_aarch64.dmg > dmg/Music_Player_${{ env.RELEASE_VERSION }}_aarch64.dmg.sha256 | ||
- name: Releasing artifacts (macos) | ||
if: matrix.platform == 'macos-latest' | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
target/release/bundle/music-player-desktop_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz | ||
target/release/bundle/music-player-desktop_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz.sha256 | ||
target/release/bundle/dmg/Music_Player_${{ env.RELEASE_VERSION }}_x64.dmg | ||
target/release/bundle/dmg/Music_Player_${{ env.RELEASE_VERSION }}_x64.dmg.sha256 | ||
target/aarch64-apple-darwin/release/bundle/music-player-desktop_${{ env.RELEASE_VERSION }}_aarch64-apple-darwin.tar.gz | ||
target/aarch64-apple-darwin/release/bundle/music-player-desktop_${{ env.RELEASE_VERSION }}_aarch64-apple-darwin.tar.gz.sha256 | ||
target/aarch64-apple-darwin/release/bundle/dmg/Music_Player_${{ env.RELEASE_VERSION }}_aarch64.dmg | ||
target/aarch64-apple-darwin/release/bundle/dmg/Music_Player_${{ env.RELEASE_VERSION }}_aarch64.dmg.sha256 | ||
- name: Hash files (ubuntu) | ||
if: matrix.platform == 'ubuntu-20.04' | ||
run: | | ||
rm -f target/release/bundle/deb/music-player_${{ env.RELEASE_VERSION }}_amd64.deb | ||
rm -f target/release/bundle/appimage/music-player_${{ env.RELEASE_VERSION }}_amd64.AppImage | ||
mv target/release/bundle/appimage/music-player*.AppImage target/release/bundle/appimage/music-player_${{ env.RELEASE_VERSION }}_amd64.AppImage | ||
mv target/release/bundle/deb/music-player*.deb target/release/bundle/deb/music-player_${{ env.RELEASE_VERSION }}_amd64.deb | ||
shasum -a 256 target/release/bundle/appimage/music-player_${{ env.RELEASE_VERSION }}_amd64.AppImage > target/release/bundle/appimage/music-player_${{ env.RELEASE_VERSION }}_amd64.AppImage.sha256 | ||
shasum -a 256 target/release/bundle/deb/music-player_${{ env.RELEASE_VERSION }}_amd64.deb > target/release/bundle/deb/music-player_${{ env.RELEASE_VERSION }}_amd64.deb.sha256 | ||
- name: Releasing artifacts (ubuntu) | ||
if: matrix.platform == 'ubuntu-20.04' | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
target/release/bundle/appimage/music-player_${{ env.RELEASE_VERSION }}_amd64.AppImage | ||
target/release/bundle/appimage/music-player_${{ env.RELEASE_VERSION }}_amd64.AppImage.sha256 | ||
target/release/bundle/deb/music-player_${{ env.RELEASE_VERSION }}_amd64.deb | ||
target/release/bundle/deb/music-player_${{ env.RELEASE_VERSION }}_amd64.deb.sha256 | ||
- name: Hash files (windows) | ||
if: matrix.platform == 'windows-latest' | ||
run: | | ||
Remove-Item -Force target/release/bundle/msi/Music_Player_x64_en-US.msi | ||
move target/release/bundle/msi/Music*.msi target/release/bundle/msi/Music_Player_x64_en-US.msi | ||
checksum -t sha256 -f="target/release/bundle/msi/Music_Player_x64_en-US.msi" > target/release/bundle/msi/Music_Player_x64_en-US.msi.sha256 | ||
- name: Releasing artifacts (windows) | ||
if: matrix.platform == 'windows-latest' | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
target/release/bundle/msi/Music_Player_x64_en-US.msi | ||
target/release/bundle/msi/Music_Player_x64_en-US.msi.sha256 | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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