Skip to content

Commit

Permalink
patch for release 2.8 linux
Browse files Browse the repository at this point in the history
  • Loading branch information
YC committed Jul 9, 2023
1 parent 78f327d commit 7fcb764
Showing 1 changed file with 26 additions and 25 deletions.
51 changes: 26 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Release

on:
release:
types:
- published
push:

jobs:
release:
Expand All @@ -12,21 +10,21 @@ jobs:
fail-fast: false
matrix:
include:
- platform: ubuntu-18.04
- platform: ubuntu-latest
GOOS: linux
GOARCH: amd64
- platform: ubuntu-18.04
- platform: ubuntu-latest
GOOS: linux
GOARCH: arm64
- platform: windows-latest
GOOS: windows
GOARCH: amd64
- platform: macos-latest
GOOS: darwin
GOARCH: amd64
- platform: macos-latest
GOOS: darwin
GOARCH: arm64
# - platform: windows-latest
# GOOS: windows
# GOARCH: amd64
# - platform: macos-latest
# GOOS: darwin
# GOARCH: amd64
# - platform: macos-latest
# GOOS: darwin
# GOARCH: arm64
runs-on: ${{ matrix.platform }}

steps:
Expand All @@ -43,9 +41,7 @@ jobs:
- name: Set version
shell: bash
run: |
(git describe --tags --exact-match \
|| git symbolic-ref -q --short HEAD \
|| git rev-parse --short HEAD) > version.txt 2> /dev/null
echo "2.8.0" > version.txt
- name: Prepare
run: |
Expand All @@ -59,19 +55,24 @@ jobs:
GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} CGO_ENABLED=0 \
go build -v -ldflags '-w -s' ../
- name: Compress working folder (Windows PowerShell)
working-directory: ./dist
if: "${{ matrix.GOOS == 'windows' }}"
run: |
Compress-Archive -Path .\wakapi.exe, .\config.yml -DestinationPath wakapi_${{ matrix.GOOS }}_${{ matrix.GOARCH }}.zip
# - name: Compress working folder (Windows PowerShell)
# working-directory: ./dist
# if: "${{ matrix.GOOS == 'windows' }}"
# run: |
# Compress-Archive -Path .\wakapi.exe, .\config.yml -DestinationPath wakapi_${{ matrix.GOOS }}_${{ matrix.GOARCH }}.zip

- name: Compress working folder
working-directory: ./dist
if: "${{ matrix.GOOS != 'windows' }}"
run: |
zip -9 wakapi_${{ matrix.GOOS }}_${{ matrix.GOARCH }}.zip *
- name: Upload built executable to Release
uses: softprops/action-gh-release@v1
- uses: actions/upload-artifact@v3
with:
files: ./dist/*.zip
name: my-artifact
path: ./dist/*.zip

# - name: Upload built executable to Release
# uses: softprops/action-gh-release@v1
# with:
# files: ./dist/*.zip

0 comments on commit 7fcb764

Please sign in to comment.