mirror of
https://github.com/beclab/Olares
synced 2026-04-21 13:37:46 +00:00
75 lines
1.9 KiB
YAML
75 lines
1.9 KiB
YAML
name: Release Daemon
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
version:
|
|
type: string
|
|
required: true
|
|
ref:
|
|
type: string
|
|
repository:
|
|
type: string
|
|
release-id:
|
|
type: string
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
type: string
|
|
required: true
|
|
ref:
|
|
type: string
|
|
repository:
|
|
type: string
|
|
release-id:
|
|
type: string
|
|
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 1
|
|
ref: ${{ inputs.ref }}
|
|
repository: ${{ inputs.repository }}
|
|
|
|
- name: Add Local Git Tag For GoReleaser
|
|
run: git tag ${{ inputs.version }}
|
|
continue-on-error: true
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.22.1
|
|
|
|
- name: install udev-devel
|
|
run: |
|
|
sudo apt update && sudo apt install -y libudev-dev
|
|
|
|
- name: Install x86_64 cross-compiler
|
|
run: sudo apt-get update && sudo apt-get install -y build-essential
|
|
|
|
- name: Install ARM cross-compiler
|
|
run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v3.1.0
|
|
env:
|
|
OLARES_RELEASE_ID: ${{ inputs.release-id }}
|
|
with:
|
|
distribution: goreleaser
|
|
workdir: './daemon'
|
|
version: v1.18.2
|
|
args: release --clean
|
|
|
|
- name: Upload to CDN
|
|
env:
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
AWS_DEFAULT_REGION: 'us-east-1'
|
|
run: |
|
|
cd daemon/output && for file in $(ls *.tar.gz | grep -v no-release-id); do
|
|
aws s3 cp "$file" s3://terminus-os-install${{ secrets.REPO_PATH }}${file} --acl=public-read
|
|
done
|