Update build.yaml to streamline compilation and packaging process
This commit simplifies and optimizes the build workflow process by leveraging the rust-build action for compiling and releasing. The "build.yaml" file has been revised to include different targets and types of archives as per the platform. Also, previous separate jobs for checking out, installing dependencies, building project, and creating/uploading archives have been removed. The new strategy is aimed to reduce redundancy, speed up the process, and allow seamless multi-platform build support.
This commit is contained in:
parent
b0daf0db5f
commit
0b686e86d9
|
@ -1,42 +1,27 @@
|
||||||
name: Keep Running
|
name: Keep Running
|
||||||
run-name: ${{ gitea.actor }} is running spotify.local CI pipeline 🚀
|
run-name: ${{ gitea.actor }} is running the Keep Running build process 🚀
|
||||||
on: [push]
|
on: [push]
|
||||||
concurrency: 'true'
|
concurrency: 'true'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Build:
|
Build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- target: x86_64-pc-windows-gnu
|
||||||
|
archive: zip
|
||||||
|
- target: x86_64-unknown-linux-musl
|
||||||
|
archive: tar.gz tar.xz tar.zst
|
||||||
|
- target: x86_64-apple-darwin
|
||||||
|
archive: zip
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- uses: actions/checkout@master
|
||||||
uses: actions/checkout@v4
|
- name: Compile and release
|
||||||
- name: Install dependencies
|
uses: rust-build/rust-build.action@v1.4.4
|
||||||
run: npm ci
|
env:
|
||||||
- name: Building project
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: npm run build
|
|
||||||
- name: Creating Linux Archive
|
|
||||||
uses: vimtor/action-zip@v1.1
|
|
||||||
with:
|
with:
|
||||||
files: out/kr-linux
|
RUSTTARGET: ${{ matrix.target }}
|
||||||
dest: linux.zip
|
ARCHIVE_TYPES: ${{ matrix.archive }}
|
||||||
- name: Upload Linux Archive
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
path: linux.zip
|
|
||||||
- name: Creating MacOS Archive
|
|
||||||
uses: vimtor/action-zip@v1.1
|
|
||||||
with:
|
|
||||||
files: out/kr-macos
|
|
||||||
dest: macos.zip
|
|
||||||
- name: Upload MacOS Archive
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
path: macos.zip
|
|
||||||
- name: Creating Windows Archive
|
|
||||||
uses: vimtor/action-zip@v1.1
|
|
||||||
with:
|
|
||||||
files: out/kr-win.exe
|
|
||||||
dest: windows.zip
|
|
||||||
- name: Upload Windows Archive
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
path: windows.zip
|
|
||||||
|
|
Loading…
Reference in New Issue