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: ...@@ -3,21 +3,41 @@ stages:
- test - test
- release - release
#########
# BUILD #
#########
build: build:
stage: build stage: build
script: script:
- echo "TODO build pamhyr" - echo "TODO build pamhyr"
# build-lang:
# stage: build
# script:
# - cd ./src/lang/
# - ./create_ts.sh
#########
# TESTS #
#########
test: test:
stage: test stage: test
script: script:
- echo "TODO PAMHYR tests" - echo "TODO PAMHYR tests"
############
# PACKAGES #
############
linux-package: linux-package:
stage: release stage: release
rules:
- if: $CI_COMMIT_BRANCH == 'master'
artifacts: artifacts:
paths: paths:
- packages/pamhyr-src.tar.gz # - packages/pamhyr-src.tar.gz
- packages/pamhyr-gnulinux-amd64.tar.xz - packages/pamhyr-gnulinux-amd64.tar.xz
script: script:
- cd packages - cd packages
...@@ -27,16 +47,20 @@ tag-linux-release: ...@@ -27,16 +47,20 @@ tag-linux-release:
stage: release stage: release
rules: rules:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
needs: artifacts:
- job: linux-package paths:
artifacts: true - packages/pamhyr-gnulinux-amd64.tar.xz
script: script:
- echo "POST ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases/${CI_COMMIT_TAG}/assets/links" - cd packages
- echo " url - ${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts" - ./linux.sh
- | release:
curl --request POST \ name: '$CI_COMMIT_TAG-release'
--header "PRIVATE-TOKEN: ${PRIVATE_TOKEN}" \ description: 'Automatic release from tag $CI_COMMIT_TAG'
--data name="pamhyr-gnulinux-amd64-${CI_COMMIT_TAG}" \ tag_name: '$CI_COMMIT_TAG'
--data url="${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/packages/pamhyr-gnulinux-amd64.tar.xz" \ ref: '$CI_COMMIT_SHA'
--data direct_asset_path="/packages/pamhyr-gnulinux-amd64.tar.xz" \ assets:
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases/${CI_COMMIT_TAG}/assets/links" 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