diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d2fffca..64a60fb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,22 +20,16 @@ image: philippheuer/docker-gitlab-powershell stages: # List of stages for jobs, and their order of execution - build - - deploy + - release -prep-job: # This job runs in the build stage, which runs first. - stage: build - script: - - powershell -Command '[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Install-Module ps2exe -Confirm:$False -Force' - - powershell -Command "ps2exe ./laps.ps1 -requireAdmin -noOutput -noError -title 'LAPS' -description 'Outil pour récupérer un mot de passe LAPS dans un Active Directory' -Company 'Académie Nancy-Metz' -noconsole -version 1.2 -outputFile /builds/jsecula/laps/laps.exe" - artifacts: - when: on_success - access: all - paths: - - ./laps.exe - expire_in: 30 days -deploy-job: # This job runs in the deploy stage. - stage: deploy # It only runs when *both* jobs in the test stage complete successfully. +create-release: # This job runs in the deploy stage. + stage: release # It only runs when *both* jobs in the test stage complete successfully. environment: production - script: - - echo "Deploying application..." - - echo "Application successfully deployed." + release: + tag_name: $CI_COMMIT_TAG + name: 'Release $CI_COMMIT_TAG' + description: 'LAPS' + assets: + links: + - name: 'laps.exe' + url: https://gitlab.forge.education.gouv.fr/jsecula/laps/-/raw/main/laps.exe?ref_type=heads&inline=false