Merge branch 'master' of gitlab.dukantic.fr:dukantic/polymusic
This commit is contained in:
@@ -1,60 +0,0 @@
|
|||||||
stages:
|
|
||||||
- build
|
|
||||||
- release
|
|
||||||
|
|
||||||
build-linux:
|
|
||||||
stage: build
|
|
||||||
image: rust:latest
|
|
||||||
script:
|
|
||||||
- rustup default stable
|
|
||||||
- cargo build --release
|
|
||||||
- mkdir -p build/linux
|
|
||||||
- cp target/release/polymusic build/linux/polymusic
|
|
||||||
- cp -r assets build/linux/assets
|
|
||||||
- cd build && zip -r linux-build.zip linux
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- build/linux
|
|
||||||
- build/linux-build.zip
|
|
||||||
expire_in: 1 week
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
|
|
||||||
build-windows:
|
|
||||||
stage: build
|
|
||||||
image: rust:latest
|
|
||||||
before_script:
|
|
||||||
- apt update && apt install -y mingw-w64 zip
|
|
||||||
script:
|
|
||||||
- rustup default stable
|
|
||||||
- rustup target add x86_64-pc-windows-gnu
|
|
||||||
- cargo build --release --target x86_64-pc-windows-gnu
|
|
||||||
- mkdir -p build/windows
|
|
||||||
- cp target/x86_64-pc-windows-gnu/release/polymusic.exe build/windows/polymusic.exe
|
|
||||||
- cp -r assets build/windows/assets
|
|
||||||
- cd build && zip -r windows-build.zip windows
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- build/windows
|
|
||||||
- build/windows-build.zip
|
|
||||||
expire_in: 1 week
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
|
|
||||||
release:
|
|
||||||
stage: release
|
|
||||||
image: curlimages/curl:latest
|
|
||||||
script:
|
|
||||||
- echo "Attaching builds to GitLab Release..."
|
|
||||||
release:
|
|
||||||
tag_name: "$CI_COMMIT_TAG"
|
|
||||||
name: "$CI_COMMIT_TAG"
|
|
||||||
description: "Release $CI_COMMIT_TAG"
|
|
||||||
assets:
|
|
||||||
links:
|
|
||||||
- name: "Linux Build (.zip)"
|
|
||||||
url: "$CI_PROJECT_URL/-/jobs/$CI_JOB_ID/artifacts/file/build/linux-build.zip"
|
|
||||||
- name: "Windows Build (.zip)"
|
|
||||||
url: "$CI_PROJECT_URL/-/jobs/$CI_JOB_ID/artifacts/file/build/windows-build.zip"
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
Reference in New Issue
Block a user