Skip to content

Commit

Permalink
ci: store artifacts after build
Browse files Browse the repository at this point in the history
# Motivation

To be able to build and release more automatic and
less dependent on the local environment, we need
to store the build artifacts in a place where we
can access them later.

# Changes

Stores some of the build artifacts from the `dist`
directory after a successful build.

# Future work

Use these artifacts to create a release together
with autogenerated docs.

# Quirks

Ideally the artifacts should be built in a
separate job to avoid potential contamination of
the build environment. But because this is a paid
`goreleaser` feature we will just have to continue
building all targets in one go.
  • Loading branch information
trym-b committed Mar 4, 2024
1 parent 92408af commit 97ffe96
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,49 @@ jobs:
args: release --clean ${{ env.flags }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# This should have been a matrix, but building separate targets is a paid feature in `goreleaser`
- uses: actions/upload-artifact@v4
with:
name: darwin-x86_64
path: dist/warchaeology_Darwin_x86_64*.tar.gz
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: linux-x86_64
path: dist/warchaeology_Linux_x86_64.tar.gz
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: linux-i386
path: dist/warchaeology_Linux_i386.tar.gz
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: windows-x86_64
path: dist/warchaeology_Windows_x86_64.zip
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: windows-i386
path: dist/warchaeology_Windows_i386.zip
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: deb-amd64
path: dist/warchaeology_*amd64.deb
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: deb-i386
path: dist/warchaeology_*i386.deb
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: rpm-x86_64
path: dist/warchaeology-*x86_64.rpm
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: rpm-i386
path: dist/warchaeology-*i386.rpm
if-no-files-found: error

0 comments on commit 97ffe96

Please sign in to comment.