Skip to content

Commit

Permalink
chore: add version release action
Browse files Browse the repository at this point in the history
Signed-off-by: Abirdcfly <[email protected]>
  • Loading branch information
Abirdcfly committed Dec 29, 2023
1 parent 3ed0634 commit 207c73a
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/image_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Build KubeAGI arcadia image
on:
push:
branches: [main]
tags:
- 'v*'
env:
GO_VER: 1.20
GO_TAGS: ""
Expand Down Expand Up @@ -45,6 +47,15 @@ jobs:
- uses: benjlevesque/[email protected]
name: Get short commit sha
id: short-sha
- name: Set extra image tags
id: set-release-tags
run: |
if [[ $GITHUB_REF =~ ^refs/tags/v.* ]]; then
echo "ARCADIA_RLEASE_TAG=kubeagi/arcadia:$TAG" >> "$GITHUB_OUTPUT"
echo "DATA-PPRCESSING_RLEASE_TAG=kubeagi/data-processing:$TAG" >> "$GITHUB_OUTPUT"
fi
env:
TAG: ${{ steps.set-env.outputs.TAG }}
- name: Build and push
id: push
uses: docker/build-push-action@v5
Expand All @@ -54,9 +65,9 @@ jobs:
platforms: linux/amd64,linux/arm64
tags: |
kubeagi/arcadia:latest
kubeagi/arcadia:${{ steps.set-env.outputs.TAG }}
kubeagi/arcadia:v${{ steps.set-env.outputs.DATE }}-${{ steps.short-sha.outputs.sha }}
kubeagi/arcadia:${{ steps.set-env.outputs.TAG }}-${{ steps.set-env.outputs.DATE }}-${{ steps.short-sha.outputs.sha }}
${{ steps.set-release-tags.outputs.ARCADIA_RLEASE_TAG }}
push: true
build-args: |
GO_VER=${{ env.GO_VER }}
Expand All @@ -72,7 +83,7 @@ jobs:
platforms: linux/amd64,linux/arm64
tags: |
kubeagi/data-processing:latest
kubeagi/data-processing:${{ steps.set-env.outputs.TAG }}
kubeagi/data-processing:v${{ steps.set-env.outputs.DATE }}-${{ steps.short-sha.outputs.sha }}
kubeagi/data-processing:${{ steps.set-env.outputs.TAG }}-${{ steps.set-env.outputs.DATE }}-${{ steps.short-sha.outputs.sha }}
${{ steps.set-env.outputs.DATA-PPRCESSING_RLEASE_TAG }}
push: true
29 changes: 29 additions & 0 deletions .github/workflows/release_version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: goreleaser

on:
push:
# run only against tags.
tags:
- 'v*'
permissions:
contents: write
# packages: write
# issues: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro':
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

51 changes: 51 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Make sure to check the documentation at https://goreleaser.com
git:
ignore_tags:
- "arcadia-*"
- "component-store-*"
- "llm-worker-*"
- "jupyterlab-*"
builds:
- skip: true
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
use: github
groups:
- title: New Features
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: 'Bug Fixes'
regexp: "^.*fix[(\\w)]*:+.*$"
order: 1
- title: Others
order: 999
filters:
exclude:
- '^Merge pull request'
release:
draft: true
replace_existing_draft: false
mode: append
header: |
## {{.ProjectName}}-v{{.Version}}
Welcome to this new release!
### Images built for this release:
- `kubeagi/arcadia:v{{ .Version }}`
- `kubeagi/data-processing:v{{ .Version }}`
### Breaking Changes:
None
### Feature summary 🚀 🚀 🚀
TODO
footer: |
## Thanks to our Contributors!
Thank you to everyone who contributed to {{.Tag}}! ❤️
And thank you very much to everyone else not listed here who contributed in other ways like filing issues, giving feedback, testing fixes, helping users in slack, etc. 🙏
name_template: "v{{.Version}}"

0 comments on commit 207c73a

Please sign in to comment.