Skip to content

artifacts-component

artifacts-component #2

# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
# This re-usable component makes artifacts
name: artifacts-component
on:
# run on both call (trigger event) and dispatch (manual)
workflow_call:
workflow_dispatch:
permissions:
contents: write
jobs:
build-artifact:
# https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
name: artifacts-component
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4 # needed for cache
- name: set up go
uses: actions/setup-go@v5 # note that this uses cache by default(?)
with:
go-version: '1.22'
cache: true
- name: build
run: make build-many
- name: Copy Files
run: |
mkdir artifacts
cp bin/cli* artifacts/
cp bin/webserver* artifacts/
cp bin/console* artifacts/
- name: archive
uses: actions/upload-artifact@v4
with:
name: artifacts
path: artifacts/
if-no-files-found: error
retention-days: 5