Skip to content

add relink command

add relink command #38

Workflow file for this run

name: CI
on:
push:
branches:
- release*
tags:
- v*
- nightly
pull_request:
branches:
- main
jobs:
build-x86_64:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
- name: Install
shell: bash
run: scripts/install.sh local-install
- name: Pack
shell: bash
run: scripts/pack.sh home-cli-x86_64.tar
- uses: actions/upload-artifact@v3
with:
name: home-cli-pack-x86_64
path: home-cli-x86_64.tar
run-x86_64:
runs-on: ubuntu-20.04
needs: build-x86_64
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: home-cli-pack-x86_64
- name: Unpack
shell: bash
run: scripts/install.sh unpack home-cli-x86_64.tar
build-arm64:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Install
shell: bash
run: scripts/install.sh local-install
- name: Pack
shell: bash
run: scripts/pack.sh home-cli-arm64.tar
- uses: actions/upload-artifact@v3
with:
name: home-cli-pack-arm64
path: home-cli-arm64.tar
run-arm64:
runs-on: ubuntu-20.04
needs: build-arm64
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- uses: actions/download-artifact@v3
with:
name: home-cli-pack-arm64
- name: Unpack
shell: bash
run: scripts/install.sh unpack home-cli-arm64.tar
release:
runs-on: ubuntu-20.04
needs:
- run-x86_64
- run-arm64
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- name: Create Release
if: "!contains(github.ref, 'nightly')"
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Delete Legacy Pre-Release
if: "contains(github.ref, 'nightly')"
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data: releases } = await github.repos.listReleases({
owner: context.repo.owner,
repo: context.repo.repo,
});
for (const release of releases) {
if (release.prerelease) {
await github.repos.deleteRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.id,
});
}
}
- name: Create Pre-Release
if: contains(github.ref, 'nightly')
id: create_pre_release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref }}
release_name: Pre-Release
draft: false
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v3
with:
name: home-cli-pack-x86_64
- name: Upload Assets x86_64
if: "!contains(github.ref, 'nightly')"
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./home-cli-x86_64.tar
asset_name: home-cli-x86_64.tar
asset_content_type: application/tar
- name: Upload Pre-Release Assets x86_64
if: contains(github.ref, 'nightly')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_pre_release.outputs.upload_url }}
asset_path: ./home-cli-x86_64.tar
asset_name: home-cli-x86_64.tar
asset_content_type: application/tar
- uses: actions/download-artifact@v3
with:
name: home-cli-pack-arm64
- name: Upload Assets arm64
if: "!contains(github.ref, 'nightly')"
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./home-cli-arm64.tar
asset_name: home-cli-arm64.tar
asset_content_type: application/tar
- name: Upload Pre-Release Assets arm64
if: contains(github.ref, 'nightly')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_pre_release.outputs.upload_url }}
asset_path: ./home-cli-arm64.tar
asset_name: home-cli-arm64.tar
asset_content_type: application/tar