Skip to content

Commit

Permalink
fix deplay.yml?
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsugu committed Aug 12, 2024
1 parent 196f35a commit b9a3a1a
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,56 @@
name: Deploy

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

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22.5'
go-version: '1.22.*'

- name: Build for ${{ matrix.os }}
run: go build -o addframe-${{ matrix.os }}
run: |
case ${{ matrix.os }} in
ubuntu-latest)
go build -o addframe-linux
;;
windows-latest)
go build -o addframe.exe
;;
macos-latest)
go build -o addframe
;;
esac
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: addframe-${{ matrix.os }}
path: addframe-${{ matrix.os }}
path: |
${{ matrix.os == 'windows-latest' && 'addframe.exe' || 'addframe' }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: ./artifacts

- name: Release
uses: softprops/action-gh-release@v1
with:
Expand Down

0 comments on commit b9a3a1a

Please sign in to comment.