mirror of
https://github.com/beclab/Olares
synced 2026-04-21 13:37:46 +00:00
144 lines
5 KiB
YAML
144 lines
5 KiB
YAML
|
|
|
|
name: Install Wizard Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
tags:
|
|
description: 'Release Tags'
|
|
|
|
jobs:
|
|
|
|
release-cli:
|
|
uses: ./.github/workflows/release-cli.yaml
|
|
secrets: inherit
|
|
with:
|
|
version: ${{ github.event.inputs.tags }}
|
|
ref: ${{ github.event.inputs.tags }}
|
|
|
|
release-daemon:
|
|
uses: ./.github/workflows/release-daemon.yaml
|
|
secrets: inherit
|
|
with:
|
|
version: ${{ github.event.inputs.tags }}
|
|
ref: ${{ github.event.inputs.tags }}
|
|
|
|
push:
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: 'Checkout source code'
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.event.inputs.tags }}
|
|
|
|
- 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'
|
|
VERSION: ${{ github.event.inputs.tags }}
|
|
run: |
|
|
bash build/image-manifest.sh && bash build/upload-images.sh .manifest/images.mf
|
|
|
|
push-arm64:
|
|
runs-on: [self-hosted, linux, ARM64]
|
|
|
|
steps:
|
|
- name: 'Checkout source code'
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.event.inputs.tags }}
|
|
|
|
- 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'
|
|
VERSION: ${{ github.event.inputs.tags }}
|
|
run: |
|
|
export PATH=$PATH:/usr/local/bin:/home/ubuntu/.local/bin
|
|
bash build/image-manifest.sh && bash build/upload-images.sh .manifest/images.mf linux/arm64
|
|
|
|
upload-package:
|
|
needs: [push, push-arm64, release-daemon]
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: 'Checkout source code'
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.event.inputs.tags }}
|
|
|
|
- name: Package installer
|
|
run: |
|
|
bash build/build.sh ${{ github.event.inputs.tags }}
|
|
|
|
- name: Upload to S3
|
|
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: |
|
|
md5sum install-wizard-v${{ github.event.inputs.tags }}.tar.gz > install-wizard-v${{ github.event.inputs.tags }}.md5sum.txt && \
|
|
aws s3 cp install-wizard-v${{ github.event.inputs.tags }}.md5sum.txt s3://terminus-os-install${{ secrets.REPO_PATH }}install-wizard-v${{ github.event.inputs.tags }}.md5sum.txt --acl=public-read && \
|
|
aws s3 cp install-wizard-v${{ github.event.inputs.tags }}.tar.gz s3://terminus-os-install${{ secrets.REPO_PATH }}install-wizard-v${{ github.event.inputs.tags }}.tar.gz --acl=public-read
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
needs: [upload-package, release-cli]
|
|
|
|
steps:
|
|
- name: 'Checkout source code'
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.event.inputs.tags }}
|
|
|
|
- name: Update env
|
|
working-directory: ./build/base-package
|
|
run: |
|
|
echo 'DEBUG_VERSION="false"' > .env
|
|
|
|
- name: Get checksum
|
|
id: vars
|
|
run: |
|
|
echo "version_md5sum=$(curl -sSfL https://dc3p1870nn3cj.cloudfront.net${{ secrets.REPO_PATH }}install-wizard-v${{ github.event.inputs.tags }}.md5sum.txt|awk '{print $1}')" >> $GITHUB_OUTPUT
|
|
|
|
- name: Update checksum
|
|
uses: eball/write-tag-to-version-file@latest
|
|
with:
|
|
filename: 'build/base-package/install.sh'
|
|
placeholder: '#__MD5SUM__'
|
|
tag: ${{ steps.vars.outputs.version_md5sum }}
|
|
|
|
- name: Package installer
|
|
run: |
|
|
bash build/build.sh ${{ github.event.inputs.tags }}
|
|
|
|
- name: 'Archives'
|
|
run: |
|
|
cp .dist/install-wizard/install.sh build/base-package
|
|
cp build/base-package/install.sh build/base-package/publicInstaller.sh
|
|
cp build/base-package/install.sh build/base-package/publicInstaller.latest
|
|
cp .dist/install-wizard/install.ps1 build/insbase-packagetaller
|
|
cp build/base-package/install.ps1 build/base-package/publicInstaller.latest.ps1
|
|
cp .dist/install-wizard/joincluster.sh build/base-package
|
|
|
|
- name: Release public files
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
name: v${{ github.event.inputs.tags }} Release
|
|
tag_name: ${{ github.event.inputs.tags }}
|
|
files: |
|
|
install-wizard-v${{ github.event.inputs.tags }}.tar.gz
|
|
build/base-package/publicInstaller.sh
|
|
build/base-package/publicInstaller.latest
|
|
build/base-package/install.sh
|
|
build/base-package/publicInstaller.latest.ps1
|
|
build/base-package/install.ps1
|
|
build/base-package/publicAddnode.sh
|
|
build/instbase-packagealler/joincluster.sh
|
|
build/base-package/version.hint
|
|
build/base-package/publicRestoreInstaller.sh
|
|
prerelease: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|