build: release built binaries as GitHub artifacts #13
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_arm64.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Darwin_arm64.zip | |
path: dist/gphotosdl_Darwin_arm64.zip | |
- name: Upload gphotosdl_Darwin_x86_64.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Darwin_x86_64.zip | |
path: dist/gphotosdl_Darwin_x86_64.zip | |
- name: Upload gphotosdl_Freebsd_arm64.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Freebsd_arm64.zip | |
path: dist/gphotosdl_Freebsd_arm64.zip | |
- name: Upload gphotosdl_Freebsd_armv6.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Freebsd_armv6.zip | |
path: dist/gphotosdl_Freebsd_armv6.zip | |
- name: Upload gphotosdl_Freebsd_i386.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Freebsd_i386.zip | |
path: dist/gphotosdl_Freebsd_i386.zip | |
- name: Upload gphotosdl_Freebsd_x86_64.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Freebsd_x86_64.zip | |
path: dist/gphotosdl_Freebsd_x86_64.zip | |
- name: Upload gphotosdl_Linux_arm64.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Linux_arm64.zip | |
path: dist/gphotosdl_Linux_arm64.zip | |
- name: Upload gphotosdl_Linux_armv6.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Linux_armv6.zip | |
path: dist/gphotosdl_Linux_armv6.zip | |
- name: Upload gphotosdl_Linux_i386.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Linux_i386.zip | |
path: dist/gphotosdl_Linux_i386.zip | |
- name: Upload gphotosdl_Linux_x86_64.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Linux_x86_64.zip | |
path: dist/gphotosdl_Linux_x86_64.zip | |
- name: Upload gphotosdl_Netbsd_arm64.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Netbsd_arm64.zip | |
path: dist/gphotosdl_Netbsd_arm64.zip | |
- name: Upload gphotosdl_Netbsd_armv6.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Netbsd_armv6.zip | |
path: dist/gphotosdl_Netbsd_armv6.zip | |
- name: Upload gphotosdl_Netbsd_i386.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Netbsd_i386.zip | |
path: dist/gphotosdl_Netbsd_i386.zip | |
- name: Upload gphotosdl_Netbsd_x86_64.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Netbsd_x86_64.zip | |
path: dist/gphotosdl_Netbsd_x86_64.zip | |
- name: Upload gphotosdl_Openbsd_arm64.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Openbsd_arm64.zip | |
path: dist/gphotosdl_Openbsd_arm64.zip | |
- name: Upload gphotosdl_Openbsd_armv6.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Openbsd_armv6.zip | |
path: dist/gphotosdl_Openbsd_armv6.zip | |
- name: Upload gphotosdl_Openbsd_i386.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Openbsd_i386.zip | |
path: dist/gphotosdl_Openbsd_i386.zip | |
- name: Upload gphotosdl_Openbsd_x86_64.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Openbsd_x86_64.zip | |
path: dist/gphotosdl_Openbsd_x86_64.zip | |
- name: Upload gphotosdl_Windows_arm64.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Windows_arm64.zip | |
path: dist/gphotosdl_Windows_arm64.zip | |
- name: Upload gphotosdl_Windows_armv6.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Windows_armv6.zip | |
path: dist/gphotosdl_Windows_armv6.zip | |
- name: Upload gphotosdl_Windows_i386.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Windows_i386.zip | |
path: dist/gphotosdl_Windows_i386.zip | |
- name: Upload gphotosdl_Windows_x86_64.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gphotosdl_Windows_x86_64.zip | |
path: dist/gphotosdl_Windows_x86_64.zip |