Files
sealos/.github/workflows/release.yml
T

65 lines
1.6 KiB
YAML
Executable File

name: Release
env:
# Common versions
GO_VERSION: "1.23"
DEFAULT_OWNER: "labring"
on:
workflow_dispatch:
push:
tags:
- "*"
jobs:
goreleaser:
runs-on: ubuntu-24.04
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Golang with cache
uses: magnetikonline/action-golang-cache@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Install Dependencies
run: |
sudo apt update && sudo apt install -y gcc-aarch64-linux-gnu \
libbtrfs-dev libgpgme-dev libdevmapper-dev \
qemu-user-static binfmt-support
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN || secrets.GITHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
args: release --clean --release-footer-tmpl=scripts/release/footer.md.tmpl --release-header-tmpl=scripts/release/head.md.tmpl
workdir: ./lifecycle
env:
USERNAME: ${{ github.repository_owner }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
cloud-release:
uses: ./.github/workflows/cloud-release.yml
needs:
- goreleaser
permissions:
contents: read
packages: write
secrets: inherit
with:
tag: ${{ github.ref_name }}
build_offline_tar_only: false