build: release built binaries as GitHub artifacts #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: goreleaser | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
permissions: | |
contents: write | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set Vars | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
run: echo "GORELEASER_FLAGS=--snapshot" >> $GITHUB_ENV | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
distribution: goreleaser | |
version: '~> v2' | |
args: release --clean ${{ env.GORELEASER_FLAGS }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload gphotosdl_darwin_amd64_v1 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_darwin_amd64_v1 | |
path: dist/gphotosdl_darwin_amd64_v1/* | |
- name: Upload gphotosdl_darwin_arm64 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_darwin_arm64 | |
path: dist/gphotosdl_darwin_arm64/* | |
- name: Upload gphotosdl_freebsd_386 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_freebsd_386 | |
path: dist/gphotosdl_freebsd_386/* | |
- name: Upload gphotosdl_freebsd_amd64_v1 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_freebsd_amd64_v1 | |
path: dist/gphotosdl_freebsd_amd64_v1/* | |
- name: Upload gphotosdl_freebsd_arm_6 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_freebsd_arm_6 | |
path: dist/gphotosdl_freebsd_arm_6/* | |
- name: Upload gphotosdl_freebsd_arm64 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_freebsd_arm64 | |
path: dist/gphotosdl_freebsd_arm64/* | |
- name: Upload gphotosdl_linux_386 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_linux_386 | |
path: dist/gphotosdl_linux_386/* | |
- name: Upload gphotosdl_linux_amd64_v1 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_linux_amd64_v1 | |
path: dist/gphotosdl_linux_amd64_v1/* | |
- name: Upload gphotosdl_linux_arm_6 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_linux_arm_6 | |
path: dist/gphotosdl_linux_arm_6/* | |
- name: Upload gphotosdl_linux_arm64 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_linux_arm64 | |
path: dist/gphotosdl_linux_arm64/* | |
- name: Upload gphotosdl_netbsd_386 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_netbsd_386 | |
path: dist/gphotosdl_netbsd_386/* | |
- name: Upload gphotosdl_netbsd_amd64_v1 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_netbsd_amd64_v1 | |
path: dist/gphotosdl_netbsd_amd64_v1/* | |
- name: Upload gphotosdl_netbsd_arm_6 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_netbsd_arm_6 | |
path: dist/gphotosdl_netbsd_arm_6/* | |
- name: Upload gphotosdl_netbsd_arm64 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_netbsd_arm64 | |
path: dist/gphotosdl_netbsd_arm64/* | |
- name: Upload gphotosdl_openbsd_386 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_openbsd_386 | |
path: dist/gphotosdl_openbsd_386/* | |
- name: Upload gphotosdl_openbsd_amd64_v1 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_openbsd_amd64_v1 | |
path: dist/gphotosdl_openbsd_amd64_v1/* | |
- name: Upload gphotosdl_openbsd_arm_6 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_openbsd_arm_6 | |
path: dist/gphotosdl_openbsd_arm_6/* | |
- name: Upload gphotosdl_openbsd_arm64 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_openbsd_arm64 | |
path: dist/gphotosdl_openbsd_arm64/* | |
- name: Upload gphotosdl_windows_386 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_windows_386 | |
path: dist/gphotosdl_windows_386/* | |
- name: Upload gphotosdl_windows_amd64_v1 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_windows_amd64_v1 | |
path: dist/gphotosdl_windows_amd64_v1/* | |
- name: Upload gphotosdl_windows_arm_6 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_windows_arm_6 | |
path: dist/gphotosdl_windows_arm_6/* | |
- name: Upload gphotosdl_windows_arm64 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_windows_arm64 | |
path: dist/gphotosdl_windows_arm64/* |