Skip to content

Commit

Permalink
Create .gitlab-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Cooper-Qu authored Sep 6, 2022
1 parent c5cf5d7 commit 041dea7
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
image: registry.gitlab.com/gitlab-org/release-cli:latest

cache:
paths:
- node_modules

before_script:
- apk update
- apk add nodejs build-base npm ruby make ruby-dev git asciidoctor curl ghostscript
- gem install asciidoctor
- gem install asciidoctor-pdf
- gem install asciidoctor-diagram
- gem install asciidoctor-bibtex
- gem install coderay
- gem install rouge
- gem install pygments.rb
- gem install json
- gem install rghost
- npm i npm@latest -g
- npm install wavedrom-cli
- PATH="$PATH:node_modules/.bin/"

job:
script:
- make
artifacts:
paths:
- "*.pdf"

release_job:
rules:
- if: $CI_COMMIT_TAG

script:
- make
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file *.pdf "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/my_package/${CI_COMMIT_TAG}/bitmanip-${CI_COMMIT_TAG}.pdf"'
- |
release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \
--assets-link "{\"name\":\"pdf\",\"url\":\"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/my_package/${CI_COMMIT_TAG}/bitmanip-${CI_COMMIT_TAG}.pdf\"}"

0 comments on commit 041dea7

Please sign in to comment.