Skip to content

Commit

Permalink
ci: always build binaries
Browse files Browse the repository at this point in the history
This way it is easier to have binaries available for each commit. The actual release is created only if a tag is present.
  • Loading branch information
devgianlu committed Oct 20, 2024
1 parent 31b206d commit 249b8fe
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Release
on:
push:
tags: [ 'v*' ]
branches: [ 'master' ]
pull_request:
branches: [ 'master' ]

permissions:
contents: write
Expand Down Expand Up @@ -37,7 +40,7 @@ jobs:
- run: git fetch --force --tags

- name: Build image
run: |
run: |
docker build \
--build-arg TARGET=${{ matrix.target }} \
--build-arg GOARCH=${{ matrix.goarch }} \
Expand All @@ -48,6 +51,7 @@ jobs:
- name: Compile binary
run: |
mkdir -p /tmp/out
docker run --rm \
--env COMMIT=${{ github.sha }} \
--env VERSION=${{ github.ref_name }} \
Expand All @@ -60,10 +64,11 @@ jobs:
with:
name: binaries
path: /tmp/out
retention-days: 1
retention-days: 7

publish:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
steps:
Expand Down

0 comments on commit 249b8fe

Please sign in to comment.