From b9a3a1ae87f05c7b00c800317a696ad2d2e9a6a6 Mon Sep 17 00:00:00 2001 From: mitsugu oyama Date: Mon, 12 Aug 2024 17:51:41 +0900 Subject: [PATCH] fix deplay.yml? --- .github/workflows/deploy.yml | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2da5087..2d04d46 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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: