Skip to content

Commit

Permalink
✨ Ci: add action release
Browse files Browse the repository at this point in the history
  • Loading branch information
soxft committed Nov 5, 2024
1 parent 5b88544 commit 6c27132
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
45 changes: 45 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: build and release

on:
push:
tags:
- "v*.*.*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23

- name: Build
run: |
GOOS=linux GOARCH=amd64 go build -o exif-pass-linux-amd64-${{ github.ref_name }}
GOOS=linux GOARCH=arm64 go build -o exif-pass-linux-arm64-${{ github.ref_name }}
GOOS=darwin GOARCH=amd64 go build -o exif-pass-darwin-amd64-${{ github.ref_name }}
GOOS=darwin GOARCH=arm64 go build -o exif-pass-darwin-arm64-${{ github.ref_name }}
GOOS=windows GOARCH=amd64 go build -o exif-pass-windows-amd64-${{ github.ref_name }}.exe
GOOS=windows GOARCH=arm64 go build -o exif-pass-windows-arm64-${{ github.ref_name }}.exe
GOOS=windows GOARCH=386 go build -o exif-pass-windows-386-${{ github.ref_name }}.exe
- name: Archive
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
exif-pass-linux-amd64-${{ github.ref_name }}
exif-pass-linux-arm64-${{ github.ref_name }}
exif-pass-darwin-amd64-${{ github.ref_name }}
exif-pass-darwin-arm64-${{ github.ref_name }}
exif-pass-windows-amd64-${{ github.ref_name }}.exe
exif-pass-windows-arm64-${{ github.ref_name }}.exe
exif-pass-windows-386-${{ github.ref_name }}.exe
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref_name }}
body: ${{ github.event.release.body }}
draft: true
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module photo_exif_do

go 1.19
go 1.23

require (
github.com/dsoprea/go-exif/v3 v3.0.1
Expand Down

0 comments on commit 6c27132

Please sign in to comment.