Monitoring of nodes using prometheus (#13) #35
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
contents: write | |
packages: write | |
id-token: write | |
jobs: | |
build-chainlaunch-ui: | |
name: Build Chainlaunch UI | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
- name: Build chainlaunch-ui | |
run: | | |
cd web | |
bun install | |
export API_URL="/api" | |
bun run build | |
- name: Upload chainlaunch-ui artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: chainlaunch-ui-dist | |
path: web/dist | |
build-linux: | |
name: Build Linux Binary | |
runs-on: ubuntu-latest | |
needs: build-chainlaunch-ui | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download chainlaunch-ui artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: chainlaunch-ui-dist | |
path: web/dist | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23.4' | |
cache-dependency-path: 'go.sum' | |
- name: Download Go modules | |
run: go mod download | |
- name: Build Linux binary | |
run: | | |
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags="-X 'github.com/chainlaunch/chainlaunch/pkg/version.Version=${{ github.ref_name }}' -X 'github.com/chainlaunch/chainlaunch/pkg/version.GitCommit=${{ github.sha }}' -X 'github.com/chainlaunch/chainlaunch/pkg/version.BuildTime=$(date -u +'%Y-%m-%dT%H:%M:%SZ')'" -o chainlaunch-linux-amd64 main.go | |
- name: Upload Linux binary as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: chainlaunch-linux-amd64 | |
path: ./chainlaunch-linux-amd64 | |
build-darwin: | |
name: Build Darwin Binaries | |
runs-on: macos-latest | |
needs: build-chainlaunch-ui | |
strategy: | |
matrix: | |
arch: [amd64, arm64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download chainlaunch-ui artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: chainlaunch-ui-dist | |
path: web/dist | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23.4' | |
cache-dependency-path: 'go.sum' | |
- name: Download Go modules | |
run: go mod download | |
- name: Build Darwin binary | |
run: | | |
CGO_ENABLED=1 GOOS=darwin GOARCH=${{ matrix.arch }} go build -ldflags="-X 'github.com/chainlaunch/chainlaunch/pkg/version.Version=${{ github.ref_name }}' -X 'github.com/chainlaunch/chainlaunch/pkg/version.GitCommit=${{ github.sha }}' -X 'github.com/chainlaunch/chainlaunch/pkg/version.BuildTime=$(date -u +'%Y-%m-%dT%H:%M:%SZ')'" -o chainlaunch-darwin-${{ matrix.arch }} main.go | |
- name: Upload Darwin binary as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: chainlaunch-darwin-${{ matrix.arch }} | |
path: ./chainlaunch-darwin-${{ matrix.arch }} | |
create-release: | |
name: Create Release | |
needs: [build-linux, build-darwin] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download all artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: ./artifacts | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref_name }} | |
release_name: ${{ github.ref_name }} | |
draft: false | |
prerelease: false | |
- name: Upload Linux AMD64 binary | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./artifacts/chainlaunch-linux-amd64/chainlaunch-linux-amd64 | |
asset_name: chainlaunch-linux-amd64 | |
asset_content_type: application/octet-stream | |
- name: Upload Darwin AMD64 binary | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./artifacts/chainlaunch-darwin-amd64/chainlaunch-darwin-amd64 | |
asset_name: chainlaunch-darwin-amd64 | |
asset_content_type: application/octet-stream | |
- name: Upload Darwin ARM64 binary | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./artifacts/chainlaunch-darwin-arm64/chainlaunch-darwin-arm64 | |
asset_name: chainlaunch-darwin-arm64 | |
asset_content_type: application/octet-stream |