Commit 3c55e303 authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

ci: Comment API and use release.

Showing with 37 additions and 13 deletions
+37 -13
......@@ -3,21 +3,41 @@ stages:
- test
- release
#########
# BUILD #
#########
build:
stage: build
script:
- echo "TODO build pamhyr"
# build-lang:
# stage: build
# script:
# - cd ./src/lang/
# - ./create_ts.sh
#########
# TESTS #
#########
test:
stage: test
script:
- echo "TODO PAMHYR tests"
############
# PACKAGES #
############
linux-package:
stage: release
rules:
- if: $CI_COMMIT_BRANCH == 'master'
artifacts:
paths:
- packages/pamhyr-src.tar.gz
# - packages/pamhyr-src.tar.gz
- packages/pamhyr-gnulinux-amd64.tar.xz
script:
- cd packages
......@@ -27,16 +47,20 @@ tag-linux-release:
stage: release
rules:
- if: $CI_COMMIT_TAG
needs:
- job: linux-package
artifacts: true
artifacts:
paths:
- packages/pamhyr-gnulinux-amd64.tar.xz
script:
- echo "POST ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases/${CI_COMMIT_TAG}/assets/links"
- echo " url - ${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts"
- |
curl --request POST \
--header "PRIVATE-TOKEN: ${PRIVATE_TOKEN}" \
--data name="pamhyr-gnulinux-amd64-${CI_COMMIT_TAG}" \
--data url="${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/packages/pamhyr-gnulinux-amd64.tar.xz" \
--data direct_asset_path="/packages/pamhyr-gnulinux-amd64.tar.xz" \
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases/${CI_COMMIT_TAG}/assets/links"
- cd packages
- ./linux.sh
release:
name: '$CI_COMMIT_TAG-release'
description: 'Automatic release from tag $CI_COMMIT_TAG'
tag_name: '$CI_COMMIT_TAG'
ref: '$CI_COMMIT_SHA'
assets:
links:
- name: 'pamhyr-gnulinux-amd64'
url: '${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/packages/pamhyr-gnulinux-amd64.tar.xz'
filepath: '/packages/pamhyr-gnulinux-amd64.tar.xz'
link_type: 'other'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment