2020-11-06 12:17:22 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*' # "v1.2.3"
|
|
|
|
|
|
|
|
name: Upload Release Asset
|
|
|
|
|
|
|
|
jobs:
|
2021-01-07 09:19:29 +00:00
|
|
|
build-amd64:
|
|
|
|
name: AMD64 release asset
|
2020-11-06 12:17:22 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-01-07 09:19:29 +00:00
|
|
|
- name: Create release
|
2020-11-06 12:17:22 +00:00
|
|
|
id: create_release
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
tag_name: ${{ github.ref }}
|
|
|
|
release_name: Release ${{ github.ref }}
|
|
|
|
draft: true
|
|
|
|
prerelease: false
|
2021-01-07 09:19:29 +00:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Build project
|
|
|
|
id: make_dist
|
|
|
|
run: |
|
|
|
|
make dist-amd64
|
|
|
|
cd dist
|
|
|
|
echo "::set-output name=linux_amd64_archive::"$(echo nimbus-eth2_Linux_amd64_*.tar.gz)
|
|
|
|
- name: Upload release asset
|
2020-11-06 12:17:22 +00:00
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
2021-01-07 09:19:29 +00:00
|
|
|
asset_path: ./dist/${{ steps.make_dist.outputs.linux_amd64_archive }}
|
|
|
|
asset_name: ${{ steps.make_dist.outputs.linux_amd64_archive }}
|
|
|
|
asset_content_type: application/gzip
|
|
|
|
build-arm64:
|
|
|
|
name: ARM64 release asset
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Install packages
|
|
|
|
env:
|
|
|
|
DEBIAN_FRONTEND: "noninteractive"
|
|
|
|
TZ: "Etc/UTC"
|
|
|
|
run: |
|
|
|
|
sudo apt-get -qq update
|
|
|
|
sudo apt-get -qq -y install binfmt-support qemu-user-static
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Build project
|
|
|
|
id: make_dist
|
|
|
|
run: |
|
|
|
|
make dist-arm64
|
|
|
|
cd dist
|
|
|
|
echo "::set-output name=linux_arm64_archive::"$(echo nimbus-eth2_Linux_arm64v8_*.tar.gz)
|
|
|
|
- name: Fetch latest release
|
|
|
|
id: fetch_release
|
|
|
|
uses: InsonusK/get-latest-release@v1.0.1
|
|
|
|
with:
|
|
|
|
myToken: ${{ github.token }}
|
|
|
|
view_top: 1
|
|
|
|
- name: Check release version
|
|
|
|
run: |
|
|
|
|
[[ "refs/tags/${{ steps.fetch_release.outputs.tag_name }}" == "${{ github.ref }}" ]]
|
|
|
|
- name: Upload release asset
|
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: https://uploads.github.com/repos/${{ github.repository }}/releases/${{ steps.fetch_release.outputs.id }}/assets{?name,label}
|
|
|
|
asset_path: ./dist/${{ steps.make_dist.outputs.linux_arm64_archive }}
|
|
|
|
asset_name: ${{ steps.make_dist.outputs.linux_arm64_archive }}
|
|
|
|
asset_content_type: application/gzip
|
|
|
|
build-arm:
|
|
|
|
name: ARM release asset
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Install packages
|
|
|
|
env:
|
|
|
|
DEBIAN_FRONTEND: "noninteractive"
|
|
|
|
TZ: "Etc/UTC"
|
|
|
|
run: |
|
|
|
|
sudo apt-get -qq update
|
|
|
|
sudo apt-get -qq -y install binfmt-support qemu-user-static
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Build project
|
|
|
|
id: make_dist
|
|
|
|
run: |
|
|
|
|
make dist-arm
|
|
|
|
cd dist
|
|
|
|
echo "::set-output name=linux_arm_archive::"$(echo nimbus-eth2_Linux_arm32v7_*.tar.gz)
|
|
|
|
- name: Fetch latest release
|
|
|
|
id: fetch_release
|
|
|
|
uses: InsonusK/get-latest-release@v1.0.1
|
|
|
|
with:
|
|
|
|
myToken: ${{ github.token }}
|
|
|
|
view_top: 1
|
|
|
|
- name: Check release version
|
|
|
|
run: |
|
|
|
|
[[ "refs/tags/${{ steps.fetch_release.outputs.tag_name }}" == "${{ github.ref }}" ]]
|
|
|
|
- name: Upload release asset
|
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: https://uploads.github.com/repos/${{ github.repository }}/releases/${{ steps.fetch_release.outputs.id }}/assets{?name,label}
|
|
|
|
asset_path: ./dist/${{ steps.make_dist.outputs.linux_arm_archive }}
|
|
|
|
asset_name: ${{ steps.make_dist.outputs.linux_arm_archive }}
|
2020-11-06 12:17:22 +00:00
|
|
|
asset_content_type: application/gzip
|
|
|
|
|