diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..172757e --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,58 @@ +default: + image: debian:11 + +stages: + - build + - publish + - release + +build: + stage: build + image: golang:1.21-alpine + before_script: + - apk update && apk add --no-cache make git + script: + - make build_password + artifacts: + paths: + - ./bin/* + +publish_main: + stage: publish + image: golang:1.21-alpine + variables: + VER: latest + before_script: + - apk update && apk add --no-cache make git curl + script: + - make publish_password + needs: + - build + only: + - main + +release_tag: + stage: publish + image: golang:1.21-alpine + variables: + VER: ${CI_COMMIT_TAG} + before_script: + - apk update && apk add --no-cache make git curl + script: + - make publish_password + needs: + - build + only: + - tags + +release_job: + stage: release + image: registry.gitlab.com/gitlab-org/release-cli:latest + rules: + - if: $CI_COMMIT_TAG + before_script: + - apk update && apk add --no-cache bash curl + script: + - bash ./scripts/gitlab_release.sh -r ./docs/release/$CI_COMMIT_TAG* -a ./bin/ + needs: + - build \ No newline at end of file diff --git a/README.md b/README.md index 5e4aa6f..fed9081 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Some tools use and dev for h6n, many are in shell/bash could be use in other pro ## Version -v1.3.0: Xavier +v1.2.0: Valentin ## release script diff --git a/docs/release.md b/docs/release.md index 6c9dbd8..54fc7b3 100644 --- a/docs/release.md +++ b/docs/release.md @@ -6,6 +6,4 @@ The naming policy is based on first names for this project. ## Release list -- [v1.3.0 Xavier](./release/v1.3.0_xavier.md) -- [v1.2.0 Valentin](./release/v1.2.0_valentin.md) - [v1.0.0 Damian](./release/v1.0.0_damian.md) diff --git a/docs/release/v1.3.0_xavier.md b/docs/release/v1.3.0_xavier.md deleted file mode 100644 index 28c8837..0000000 --- a/docs/release/v1.3.0_xavier.md +++ /dev/null @@ -1,8 +0,0 @@ -# Xavier v1.3.0 - -## Release feature - -- update readme -- update script -- add ci for forgejo -- clean old ci \ No newline at end of file