mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
chore: try merge release action
This commit is contained in:
parent
4a4e19fcbd
commit
2e0f79df3b
55
.github/workflows/linux-build-on-release.yml
vendored
55
.github/workflows/linux-build-on-release.yml
vendored
@ -1,55 +0,0 @@
|
|||||||
name: Linux
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
pull_request:
|
|
||||||
release:
|
|
||||||
types:
|
|
||||||
- published
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-release:
|
|
||||||
name: Linux - Build, Test & Release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Set up Go 1.x
|
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: ^1.18
|
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Get dependencies
|
|
||||||
run: go get
|
|
||||||
|
|
||||||
- name: Unit Tests
|
|
||||||
run: go test ./... -run ./...
|
|
||||||
|
|
||||||
- name: API Tests
|
|
||||||
run: |
|
|
||||||
npm -g install newman
|
|
||||||
./testing/run_api_tests.sh
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: GO111MODULE=on go build -v .
|
|
||||||
|
|
||||||
- name: Zip executable and sample config
|
|
||||||
if: github.event_name == 'release'
|
|
||||||
run: |
|
|
||||||
cp config.default.yml config.yml
|
|
||||||
zip -9 release.zip wakapi config.yml
|
|
||||||
|
|
||||||
- name: Upload built executable to Release
|
|
||||||
if: github.event_name == 'release'
|
|
||||||
uses: actions/upload-release-asset@v1.0.2
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ github.event.release.upload_url }}
|
|
||||||
asset_path: release.zip
|
|
||||||
asset_name: wakapi_linux_amd64.zip
|
|
||||||
asset_content_type: application/gzip
|
|
@ -1,4 +1,4 @@
|
|||||||
name: Windows
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -10,8 +10,13 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-release:
|
build-and-release:
|
||||||
name: Windows - Build & Release
|
name: Build & Release
|
||||||
runs-on: windows-latest
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Set up Go 1.x
|
- name: Set up Go 1.x
|
||||||
@ -33,11 +38,15 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: go build -v .
|
run: go build -v .
|
||||||
|
|
||||||
- name: Compress working folder
|
- name: Compress working folder on Windows
|
||||||
if: github.event_name == 'release'
|
if: runner.os == 'Windows'
|
||||||
run: |
|
run: |
|
||||||
cp .\config.default.yml .\config.yml
|
cp .\config.default.yml .\config.yml
|
||||||
Compress-Archive -Path .\wakapi.exe, .\config.yml -DestinationPath release.zip
|
Compress-Archive -Path .\wakapi.exe, .\config.yml -DestinationPath release.zip
|
||||||
|
- name: Compress working folder on Unix
|
||||||
|
run: |
|
||||||
|
cp config.default.yml config.yml
|
||||||
|
zip -9 release.zip wakapi config.yml
|
||||||
|
|
||||||
- name: Upload built executable to Release
|
- name: Upload built executable to Release
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
@ -47,5 +56,5 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
upload_url: ${{ github.event.release.upload_url }}
|
upload_url: ${{ github.event.release.upload_url }}
|
||||||
asset_path: release.zip
|
asset_path: release.zip
|
||||||
asset_name: wakapi_win_amd64.zip
|
asset_name: wakapi_${{ runner.os }}_amd64.zip
|
||||||
asset_content_type: application/gzip
|
asset_content_type: application/gzip
|
Loading…
x
Reference in New Issue
Block a user