Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(main): remove release 4.x #4229

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 9 additions & 48 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,64 +32,25 @@ jobs:
libbtrfs-dev libgpgme-dev libdevmapper-dev \
qemu-user-static binfmt-support

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_RELEASE_PAT }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
args: release --clean --release-footer-tmpl=scripts/release/footer.md.tmpl --release-header-tmpl=scripts/release/head.md.tmpl
args: release -f .goreleaser-5.0.yml --clean --release-footer-tmpl=scripts/release/footer.md.tmpl --release-header-tmpl=scripts/release/head.md.tmpl
env:
USERNAME: ${{ github.repository_owner }}
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}

sync:
runs-on: ubuntu-20.04
needs:
- goreleaser
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch Current version
id: get-current-tag
uses: actions-ecosystem/action-get-latest-tag@v1.6.0
- name: Renew issue and Sync Patch Images
uses: labring/gh-rebot@v0.0.6
if: ${{ github.repository_owner == env.DEFAULT_OWNER }}
with:
version: v0.0.8-rc1
env:
GH_TOKEN: "${{ secrets.GH_PAT }}"
SEALOS_TYPE: "issue_renew"
SEALOS_ISSUE_TITLE: "[DaylyReport] Auto build for sealos"
SEALOS_ISSUE_BODYFILE: "scripts/ISSUE_RENEW.md"
SEALOS_ISSUE_LABEL: "dayly-report"
SEALOS_ISSUE_TYPE: "day"
SEALOS_ISSUE_REPO: "labring-actions/cluster-image"
SEALOS_COMMENT_BODY: "/imagebuild_apps sealos-patch ${{steps.get-current-tag.outputs.tag }}"

- name: Renew issue and Sync Images
uses: labring/gh-rebot@v0.0.6
if: ${{ github.repository_owner == env.DEFAULT_OWNER }}
with:
version: v0.0.8-rc1
- name: Delete release Asset
env:
GH_TOKEN: "${{ secrets.GH_PAT }}"
SEALOS_TYPE: "issue_renew"
SEALOS_ISSUE_TITLE: "[DaylyReport] Auto build for sealos"
SEALOS_ISSUE_BODYFILE: "scripts/ISSUE_RENEW.md"
SEALOS_ISSUE_LABEL: "dayly-report"
SEALOS_ISSUE_TYPE: "day"
SEALOS_ISSUE_REPO: "labring-actions/cluster-image"
SEALOS_COMMENT_BODY: "/imagebuild_apps sealos ${{steps.get-current-tag.outputs.tag }}"

USERNAME: ${{ github.repository_owner }}
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
run: |
ASSET_IDS=$(gh release view ${{steps.get-current-tag.outputs.tag }} --repo ${USERNAME}/sealos --json assets | jq -r ".assets[].name")
for ASSET_ID in $ASSET_IDS; do
gh release delete-asset ${{steps.get-current-tag.outputs.tag }} $ASSET_ID --repo ${USERNAME}/sealos
done
changelog:
runs-on: ubuntu-20.04
needs:
Expand Down
78 changes: 78 additions & 0 deletions .goreleaser-5.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
project_name: sealos
#gomod:
# # Proxy a module from proxy.golang.org, making the builds verifiable.
# # This will only be effective if running against a tag. Snapshots will ignore this setting.
# # Notice: for this to work your `build.main` must be a package, not a `.go` file.
# #
# # Default is false.
# proxy: true
#
# # If proxy is true, use these environment variables when running `go mod` commands (namely, `go mod tidy`).
# # Defaults to `os.Environ()`.
# env:
# - GOPROXY=https://goproxy.cn

builds:
- id: image-cri-shim
env:
- CGO_ENABLED=0
main: ./cmd/image-cri-shim
binary: image-cri-shim
goos:
- linux
goarch:
- amd64
flags:
- -trimpath
tags:
- containers_image_openpgp
- netgo
- exclude_graphdriver_devicemapper
- static
- osusergo
- exclude_graphdriver_btrfs
ldflags:
- -X github.com/labring/sealos/pkg/version.gitVersion={{.Version}}
- -X github.com/labring/sealos/pkg/version.gitCommit={{.ShortCommit}}
- -X github.com/labring/sealos/pkg/version.buildDate={{.Date}}
- -s -w


snapshot:
name_template: "{{ .Tag }}-next"

changelog:
sort: asc
use: github
groups:
- title: Dependency updates
regexp: '^.*?(feat|fix)\(deps\)!?:.+$'
order: 300
- title: 'New Features'
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 100
- title: 'Security updates'
regexp: '^.*?sec(\([[:word:]]+\))??!?:.+$'
order: 150
- title: 'Bug fixes'
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 200
- title: 'Documentation updates'
regexp: ^.*?doc(\([[:word:]]+\))??!?:.+$
order: 400
- title: 'Build process updates'
regexp: ^.*?build(\([[:word:]]+\))??!?:.+$
order: 400
- title: Other work
order: 9999
filters:
exclude:
- '^test:'
- '^chore'
- 'merge conflict'
- Merge pull request
- Merge remote-tracking branch
- Merge branch
- go mod tidy
release:
prerelease: auto
Loading