Skip to content
Snippets Groups Projects
Commit 6ebf3c55 authored by Lucas García's avatar Lucas García
Browse files

fix: gitlab ci config

parent 7638e780
No related branches found
No related tags found
No related merge requests found
workflow: workflow:
rules: rules:
- if: $CI_COMMIT_BRANCH - if: $CI_COMMIT_BRANCH
changes: changes:
- README.md - README.md
- .gitlab-ci.yml - .gitlab-ci.yml
when: never when: never
...@@ -14,6 +14,7 @@ workflow: ...@@ -14,6 +14,7 @@ workflow:
- if: $CI_COMMIT_TAG =~ /^[0-9]+[.][0-9]+([.][0-9]+)?([-a-z])*$/ - if: $CI_COMMIT_TAG =~ /^[0-9]+[.][0-9]+([.][0-9]+)?([-a-z])*$/
stages: # List of stages for jobs, and their order of execution stages: # List of stages for jobs, and their order of execution
- build
- package - package
- upload - upload
- release - release
...@@ -30,22 +31,33 @@ variables: ...@@ -30,22 +31,33 @@ variables:
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
GIT_SUBMODULE_FORCE_HTTPS: "true" GIT_SUBMODULE_FORCE_HTTPS: "true"
package: build:
stage: build
image: node:latest
script:
- npm install && npm run build
- find . -name node_modules -type d | xargs rm -rf
artifacts:
paths:
- assets
package:
image: javieraviles/zip:latest image: javieraviles/zip:latest
stage: package stage: package
script: script:
- 'zip -r $ZIP * -x "*CODE_OF_CONDUCT.md" -x "*node_modules*" -x "*bin/*" -x "*tests/*" -x "*.gitignore" -x "*.gitlab-ci.yml" -x "*.gitmodules" -x "*phpunit.xml.dist" -x "*Gruntfile.js" -x "*package.json" -x "*package-lock.json" -x "*.travis.yml" -x "*.editorconfig" -x "*.distignore" -x "*src/*"' - 'zip -r $ZIP * -x "*CODE_OF_CONDUCT.md" -x "*node_modules*" -x "*bin/*" -x "*tests/*" -x "*.gitignore" -x "*.gitlab-ci.yml" -x "*.gitmodules" -x "*.php-cs-fixer.cache" -x "*phpunit.xml.dist" -x "*Gruntfile.js" -x "*package.json" -x "*package-lock.json" -x "*.travis.yml" -x "*.editorconfig" -x "*.distignore" -x "*src/*" -x "*.husky*" -x ".lintstagedrc.js" -x ".pretierrc" -x ".prettierrc-php" -x ".prettierignore" -x "eslint.config.js" -x "*.nvimrc*"'
- 'ls -lah' - 'ls -lah'
artifacts: artifacts:
paths: paths:
- $ZIP - $ZIP
upload: upload:
stage: upload stage: upload
image: curlimages/curl:latest image: curlimages/curl:latest
script: script:
- | - |
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${ZIP} ${PACKAGE_REGISTRY_URL}/${ZIP} curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${ZIP} ${PACKAGE_REGISTRY_URL}/${ZIP}
release: release:
# Caution, as of 2021-02-02 these assets links require a login, see: # Caution, as of 2021-02-02 these assets links require a login, see:
# https://gitlab.com/gitlab-org/gitlab/-/issues/299384 # https://gitlab.com/gitlab-org/gitlab/-/issues/299384
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment