Skip to content

Commit

Permalink
build: add release promotion (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaspin authored Nov 21, 2024
1 parent 6fd16ad commit 3c892b4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .semaphore/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: v1.0
name: Release
agent:
machine:
type: e2-standard-2
os_image: ubuntu2004
blocks:
- name: "Release"
task:
env_vars:
- name: GO111MODULE
value: "on"
secrets:
- name: dockerhub-write
prologue:
commands:
- sem-version go 1.22.7
- "export GOPATH=~/go"
- "export PATH=/home/semaphore/go/bin:$PATH"
- checkout
jobs:
- name: Release new version
commands:
- echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin
- make docker.build
- make docker.push
11 changes: 10 additions & 1 deletion .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,13 @@ after_pipeline:
jobs:
- name: Submit Reports
commands:
- test-results gen-pipeline-report
- test-results gen-pipeline-report

promotions:
- name: Release
pipeline_file: "release.yml"
deployment_target: Release
auto_promote_on:
- result: passed
branch:
- "^refs/tags/v*"

0 comments on commit 3c892b4

Please sign in to comment.