Skip to content

Fix the lint issues #12

Fix the lint issues

Fix the lint issues #12

Workflow file for this run

name: "On Release"
on:
push:
# Publish `1.2.3` tags as releases.
tags:
- "*"
# Allow to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
release_amd64:
runs-on: ubuntu-latest
container:
image: crystallang/crystal:latest-alpine
steps:
- uses: actions/checkout@v2
- run: VERSION="${{ github.ref_name }}" shards build --production --release --static --stats --time
- name: Rename
run: |
mv bin/gluster-metrics-exporter bin/gluster-metrics-exporter-amd64
- name: Upload gluster-metrics-exporter-amd64 to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bin/gluster-metrics-exporter-amd64
tag: ${{ github.ref }}
overwrite: true
file_glob: true
release_arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Pull images
run: |
docker pull multiarch/qemu-user-static
- name: Install QEMU
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Build
working-directory: .
run: |
docker run -i -v `pwd`:/workspace -w /workspace --rm multiarch/alpine:aarch64-edge /bin/sh -c "echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/community' >>/etc/apk/repositories; apk add --update --no-cache --force-overwrite llvm12-dev llvm12-static crystal@edge gc-dev gcc gmp-dev libatomic_ops libevent-static musl-dev pcre-dev libxml2-dev openssl-dev openssl-libs-static tzdata yaml-dev zlib-static make git g++ shards@edge yaml-static; VERSION="${{ github.ref_name }}" shards build --production --release --static --stats --time"
- name: Rename
run: |
sudo mv bin/gluster-metrics-exporter bin/gluster-metrics-exporter-arm64
- name: Upload gluster-metrics-exporter-arm64 to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bin/gluster-metrics-exporter-arm64
tag: ${{ github.ref }}
overwrite: true
file_glob: true
upload_release_files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Upload gluster-metrics-exporter.service to the release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: extra/*.service
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- name: Upload install.sh script to the release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: extra/install.sh
tag: ${{ github.ref }}
overwrite: true
file_glob: true