Try to auto-release builds
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
stages:
|
stages:
|
||||||
- check
|
- check
|
||||||
- build
|
- build
|
||||||
|
- release
|
||||||
|
|
||||||
check:
|
check:
|
||||||
stage: check
|
stage: check
|
||||||
@@ -8,10 +9,42 @@ check:
|
|||||||
- nix
|
- nix
|
||||||
script:
|
script:
|
||||||
- nix flake check
|
- nix flake check
|
||||||
|
- TAG=$(date +%Y.%m.%d).$CI_COMMIT_SHORT_SHA
|
||||||
|
- echo "TAG=$TAG" > variables.env
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
dotenv: variables.env
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
|
needs:
|
||||||
|
- job: check
|
||||||
|
artifacts: true
|
||||||
tags:
|
tags:
|
||||||
- nix
|
- nix
|
||||||
script:
|
script:
|
||||||
- nom build
|
- nom build
|
||||||
|
- cp result/sword.tar.xz ./sword-$TAG.tar.xz
|
||||||
|
- echo "BUILD_ID=$CI_JOB_ID" > build.env
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- sword-$TAG.tar.xz
|
||||||
|
reports:
|
||||||
|
dotenv: build.env
|
||||||
|
expire_in: never
|
||||||
|
|
||||||
|
"Create release":
|
||||||
|
stage: release
|
||||||
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||||
|
needs:
|
||||||
|
- job: check
|
||||||
|
artifacts: true
|
||||||
|
- job: build
|
||||||
|
artifacts: true
|
||||||
|
script: echo "Tagging as released"
|
||||||
|
release:
|
||||||
|
name: Release $TAG
|
||||||
|
tag_name: '$TAG'
|
||||||
|
assets-link:
|
||||||
|
- name: Windows (x86-64) release
|
||||||
|
url: "https://src.thehellings.com/greg/mingw-nix-build/-/jobs/$BUILD_ID/artifacts/file/sword-$TAG.tar.xz"
|
||||||
|
|||||||
Reference in New Issue
Block a user