fix bounded channel send #74
Workflow file for this run
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
name: Release from tag | |
on: | |
push: | |
tags: | |
- "*.*.*" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build_ui: | |
name: Build UI | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: davidB/rust-cargo-make@v1 | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: wasm-pack | |
- name: Build release | |
run: cargo make build_ui_release | |
- name: Upload pkg dir | |
uses: actions/upload-artifact@v3 | |
with: | |
name: web_ui | |
path: rsplayer_web_ui/public/pkg | |
build_backend: | |
needs: build_ui | |
strategy: | |
matrix: | |
target: ["arm-unknown-linux-gnueabihf", "armv7-unknown-linux-gnueabihf","aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu"] | |
name: Release | |
# make it use older libc version | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
# remove cache if you get random libc errors, target based key should help | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.target }} | |
- uses: davidB/rust-cargo-make@v1 | |
- name: Download web_ui | |
uses: actions/download-artifact@v3 | |
with: | |
name: web_ui | |
path: rsplayer_web_ui/public/pkg | |
# !!! Do not use binstall because it does not work well for cross compilation and libc dependency | |
- name: Install tools | |
run: | | |
cargo install cross | |
cargo install cargo-deb | |
- name: Build Backend | |
run: cargo make --env TARGET=${{ matrix.target }} build_release | |
- name: Create deb package | |
run: cargo make --env RELEASE_VERSION=${GITHUB_REF_NAME} --env TARGET=${{ matrix.target }} package_deb_release | |
- name: Upload deb package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: deb-${{ matrix.target }} | |
path: target/${{ matrix.target }}/debian/*.deb | |
- name: Upload binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rsplayer-${{ matrix.target }} | |
path: target/${{ matrix.target }}/release/rsplayer | |
publish: | |
needs: build_backend | |
name: Create release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download files | |
uses: actions/download-artifact@v3 | |
# todo: make rename as generic script | |
- name: Rename binary files | |
run: | | |
mv rsplayer-aarch64-unknown-linux-gnu/rsplayer rsplayer_arm64 | |
mv rsplayer-armv7-unknown-linux-gnueabihf/rsplayer rsplayer_armhfv7 | |
mv rsplayer-arm-unknown-linux-gnueabihf/rsplayer rsplayer_armhfv6 | |
mv rsplayer-x86_64-unknown-linux-gnu/rsplayer rsplayer_amd64 | |
- name: Display new structure of downloaded files | |
run: ls -R | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: true | |
prerelease: true | |
generate_release_notes: true | |
fail_on_unmatched_files: true | |
files: | | |
**/*.deb | |
rsplayer_* |