mirror of
https://github.com/beclab/Olares
synced 2026-04-21 13:37:46 +00:00
205 lines
7.4 KiB
YAML
205 lines
7.4 KiB
YAML
|
|
|
|
name: Install Wizard Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
tags:
|
|
description: 'Release Tags'
|
|
|
|
jobs:
|
|
|
|
release-id:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
id: ${{ steps.generate.outputs.id }}
|
|
steps:
|
|
- name: 'Checkout source code'
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.event.inputs.tags }}
|
|
- id: generate
|
|
run: |
|
|
hash=$(git rev-parse --short HEAD)
|
|
echo "id=$hash" >> "$GITHUB_OUTPUT"
|
|
|
|
release-cli:
|
|
needs: [release-id]
|
|
uses: ./.github/workflows/release-cli.yaml
|
|
secrets: inherit
|
|
with:
|
|
version: ${{ github.event.inputs.tags }}
|
|
release-id: ${{ needs.release-id.outputs.id }}
|
|
ref: ${{ github.event.inputs.tags }}
|
|
|
|
release-daemon:
|
|
needs: [release-id]
|
|
uses: ./.github/workflows/release-daemon.yaml
|
|
secrets: inherit
|
|
with:
|
|
version: ${{ github.event.inputs.tags }}
|
|
release-id: ${{ needs.release-id.outputs.id }}
|
|
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
|
|
|
|
push-deps:
|
|
needs: [release-daemon, release-id]
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: "Checkout source code"
|
|
uses: actions/checkout@v3
|
|
|
|
# test
|
|
- 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 }}
|
|
RELEASE_ID: ${{ needs.release-id.outputs.id }}
|
|
REPO_PATH: '${{ secrets.REPO_PATH }}'
|
|
run: |
|
|
bash build/deps-manifest.sh && bash build/upload-deps.sh
|
|
|
|
push-deps-arm64:
|
|
needs: [release-daemon, release-id]
|
|
runs-on: [self-hosted, linux, ARM64]
|
|
|
|
steps:
|
|
- name: "Checkout source code"
|
|
uses: actions/checkout@v3
|
|
|
|
# test
|
|
- 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 }}
|
|
RELEASE_ID: ${{ needs.release-id.outputs.id }}
|
|
REPO_PATH: '${{ secrets.REPO_PATH }}'
|
|
run: |
|
|
export PATH=$PATH:/usr/local/bin:/home/ubuntu/.local/bin
|
|
bash build/deps-manifest.sh linux/arm64 && bash build/upload-deps.sh linux/arm64
|
|
|
|
|
|
upload-package:
|
|
needs: [push, push-arm64, push-deps, push-deps-arm64, release-daemon, release-id]
|
|
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
|
|
|
|
aws s3 cp install-wizard-v${{ needs.daily-version.outputs.version }}.md5sum.txt s3://terminus-os-install${{ secrets.REPO_PATH }}install-wizard-v${{ needs.daily-version.outputs.version }}.${{ needs.release-id.outputs.id }}.md5sum.txt --acl=public-read && \
|
|
aws s3 cp install-wizard-v${{ needs.daily-version.outputs.version }}.tar.gz s3://terminus-os-install${{ secrets.REPO_PATH }}install-wizard-v${{ needs.daily-version.outputs.version }}.${{ needs.release-id.outputs.id }}.tar.gz --acl=public-read && \
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
needs: [upload-package, release-cli, release-id]
|
|
|
|
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 }}.${{ needs.release-id.outputs.id }}.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 }} ${{ needs.release-id.outputs.id }}
|
|
|
|
- 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/base-package
|
|
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/base-package/joincluster.sh
|
|
build/base-package/version.hint
|
|
build/base-package/publicRestoreInstaller.sh
|
|
prerelease: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|