Skip to content

(wip, fix) CI: upload artifacts in Goreleaser workflow #5

(wip, fix) CI: upload artifacts in Goreleaser workflow

(wip, fix) CI: upload artifacts in Goreleaser workflow #5

Workflow file for this run

name: goreleaser
on:
push:
tags:
- '*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
upload-artifacts:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
- name: Install build dependencies
run: |
apt-get update
apt-get install -y pkg-config build-essential
- name: Build
run: go build -o apx
- name: Compress
run: tar -czvf apx.tar.gz apx
- name: Compress-manpage
run: tar -czvf apx-man.tar.gz man/man1/apx.1
- name: Compress-config
run: tar -czvf apx-config.tar.gz config/apx.json
- uses: softprops/action-gh-release@v1
with:
token: "${{ secrets.GITHUB_TOKEN }}"
files: |
apx.tar.gz
apx-man.tar.gz
apx-config.tar.gz