Skip to content

chore: Update build script to create tar.gz archive for the output file #1

chore: Update build script to create tar.gz archive for the output file

chore: Update build script to create tar.gz archive for the output file #1

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*.*.*' # Matches tags like v1.0.0, v2.1.3, etc.
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.16
- name: Run build script
run: ./build.sh
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: build/*.tar.gz
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
path: build
- name: Create GitHub Release
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: false
prerelease: false
- name: Upload Release Assets for amd64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/fly-linux-amd64.tar.gz
asset_name: fly-linux-amd64.tar.gz
asset_content_type: application/gzip
- name: Upload Release Assets for arm64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/fly-linux-arm64.tar.gz
asset_name: fly-linux-arm64.tar.gz
asset_content_type: application/gzip