mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
Merge pull request #402 from muety/release-arch
Add more architectures to release binaries (resolve #401)
This commit is contained in:
commit
cec2a84e2d
37
.github/workflows/release.yml
vendored
37
.github/workflows/release.yml
vendored
@ -8,20 +8,13 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: 'Build, package and release to GitHub'
|
name: 'Build, package and release to GitHub'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ubuntu-latest, macos-latest, windows-latest]
|
GOOS: [darwin, windows, linux]
|
||||||
include:
|
GOARCH: [amd64, arm64]
|
||||||
- platform: ubuntu-latest
|
|
||||||
alias: linux
|
|
||||||
- platform: macos-latest
|
|
||||||
alias: mac
|
|
||||||
- platform: windows-latest
|
|
||||||
alias: win
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Set up Go 1.x
|
- name: Set up Go 1.x
|
||||||
@ -40,24 +33,22 @@ jobs:
|
|||||||
|| git symbolic-ref -q --short HEAD \
|
|| git symbolic-ref -q --short HEAD \
|
||||||
|| git rev-parse --short HEAD) > version.txt 2> /dev/null
|
|| git rev-parse --short HEAD) > version.txt 2> /dev/null
|
||||||
|
|
||||||
- name: Get dependencies
|
- name: Prepare
|
||||||
run: go get
|
run: |
|
||||||
|
mkdir -p dist/ && cd dist/
|
||||||
|
cp ../config.default.yml config.yml
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go build -v .
|
working-directory: ./dist
|
||||||
|
run: |
|
||||||
|
GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} go build -v ../
|
||||||
|
|
||||||
- name: Compress working folder on Windows
|
- name: Compress working folder
|
||||||
if: runner.os == 'Windows'
|
working-directory: ./dist
|
||||||
run: |
|
run: |
|
||||||
cp .\config.default.yml .\config.yml
|
zip -9 wakapi_${{ matrix.GOOS }}_${{ matrix.GOARCH }}.zip *
|
||||||
Compress-Archive -Path .\wakapi.exe, .\config.yml -DestinationPath wakapi_${{ matrix.alias }}_amd64.zip
|
|
||||||
- name: Compress working folder on Unix
|
|
||||||
if: runner.os != 'Windows'
|
|
||||||
run: |
|
|
||||||
cp config.default.yml config.yml
|
|
||||||
zip -9 wakapi_${{ matrix.alias }}_amd64.zip wakapi config.yml
|
|
||||||
|
|
||||||
- name: Upload built executable to Release
|
- name: Upload built executable to Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
files: wakapi_${{ matrix.alias }}_amd64.zip
|
files: ./dist/*.zip
|
||||||
|
Loading…
x
Reference in New Issue
Block a user