Skip to content

Commit

Permalink
Add release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
rajshrimohanks committed Oct 27, 2024
1 parent 3eaaf50 commit 7c4dd65
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release assets

on:
release:
types:
- created

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

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

- name: Display the release tag
run: echo ${{ github.event.release.tag_name }}

- name: Build
run: ./release.sh

# https://github.com/svenstaro/upload-release-action
- name: Upload the Rodeo binaries
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: ./release/*
file_glob: true
overwrite: true
make_latest: true
19 changes: 19 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
rm -rf release/

VER=$1
if [ -z "$1" ]; then
VER="v0.0"
fi

echo "Building version: $VER"
export GOARCH=amd64

export GOOS=windows
go build -v -o release/exif-rename_${VER}_${GOOS}-${GOARCH}.exe .

export GOOS=linux
go build -v -o release/exif-rename_${VER}_${GOOS}-${GOARCH} .

export GOOS=darwin
go build -v -o release/exif-rename_${VER}_${GOOS}-${GOARCH} .

0 comments on commit 7c4dd65

Please sign in to comment.