mirror of https://github.com/statping/statping
workflow
parent
ba035da0e7
commit
a8cd422232
|
@ -116,85 +116,52 @@ jobs:
|
||||||
name: statping-${{ matrix.platform }}-${{ matrix.arch }}
|
name: statping-${{ matrix.platform }}-${{ matrix.arch }}
|
||||||
path: ./build
|
path: ./build
|
||||||
|
|
||||||
- name: check files
|
|
||||||
run: pwd && ls && cd build && ls
|
|
||||||
|
|
||||||
test-binary-on-platform:
|
package:
|
||||||
needs: build
|
needs: build
|
||||||
strategy:
|
runs-on: ubuntu-latest
|
||||||
matrix:
|
|
||||||
os: [macos-latest,ubuntu-latest,windows-latest]
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set correct darwin platform name
|
- uses: actions/checkout@v2
|
||||||
if: matrix.os == 'macos-latest'
|
|
||||||
run: echo ::set-env name=PLATFORM::darwin
|
|
||||||
shell: bash
|
|
||||||
- name: Set correct linux platform name
|
|
||||||
if: matrix.os == 'ubuntu-latest'
|
|
||||||
run: echo ::set-env name=PLATFORM::linux
|
|
||||||
shell: bash
|
|
||||||
- name: Set correct windows name
|
|
||||||
if: matrix.os == 'windows-latest'
|
|
||||||
run: echo ::set-env name=PLATFORM::windows
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Download Statping
|
- name: Download All Binaries
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: statping-${{ env.PLATFORM }}-amd64
|
path: ./build
|
||||||
path: ./bin
|
|
||||||
|
|
||||||
- name: Fix statping permissions
|
- name: Production Ready Binaries
|
||||||
run: |
|
run: |
|
||||||
mv bin/statping-${{ env.PLATFORM }}-amd64 bin/statping
|
cd build && chmod +x *
|
||||||
chmod +x bin/statping
|
mv statping-darwin-10.6-amd64 statping && tar -czvf statping-darwin-amd64.tar.gz statping && rm -f statping
|
||||||
mv bin/statping /usr/local/bin/statping
|
mv statping-linux-386 statping && tar -czvf statping-linux-386.tar.gz statping && rm -f statping
|
||||||
|
mv statping-linux-amd64 statping && tar -czvf statping-linux-amd64.tar.gz statping && rm -f statping
|
||||||
|
mv statping-linux-386 statping && tar -czvf statping-linux-386.tar.gz statping && rm -f statping
|
||||||
|
mv statping-linux-arm-7 statping && tar -czvf statping-linux-arm-7.tar.gz statping && rm -f statping
|
||||||
|
mv statping-linux-arm-6 statping && tar -czvf statping-linux-arm-6.tar.gz statping && rm -f statping
|
||||||
|
mv statping-linux-arm64 statping && tar -czvf statping-linux-arm64.tar.gz statping && rm -f statping
|
||||||
|
mv statping-windows-4.0-386.exe statping.exe && zip statping-windows-386.zip statping.exe && rm -f statping.exe
|
||||||
|
mv statping-windows-4.0-amd64.exe statping.exe && zip statping-windows-amd64.zip statping.exe && rm -f statping.exe
|
||||||
|
|
||||||
- name: Run 'statping version'
|
- name: Upload Releases
|
||||||
run: statping version
|
id: upload-assets
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
- name: Run Statping on port 80
|
|
||||||
env:
|
env:
|
||||||
DB_CONN: sqlite
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
API_SECRET: demoapisecret123
|
VERSION: ${{ env.VERSION }}
|
||||||
run: statping --port 80
|
with:
|
||||||
|
tag_name: dev-v${{ env.VERSION }}
|
||||||
|
draft: true
|
||||||
|
prerelease: true
|
||||||
|
files: |
|
||||||
|
build/statping-darwin-amd64.tar.gz
|
||||||
|
build/statping-linux-386.tar.gz
|
||||||
|
build/statping-linux-amd64.tar.gz
|
||||||
|
build/statping-linux-arm-6.tar.gz
|
||||||
|
build/statping-linux-arm-7.tar.gz
|
||||||
|
build/statping-linux-arm64.tar.gz
|
||||||
|
build/statping-windows-386.zip
|
||||||
|
build/statping-windows-amd64.zip
|
||||||
|
|
||||||
|
- name: Upload Compiled Binaries to S3
|
||||||
# - name: Production Ready Binaries
|
run: |
|
||||||
# run: |
|
aws s3 cp build/*.* s3://assets.statping.com/commit/${{ github.sha }}/
|
||||||
# cd build && chmod +x *
|
|
||||||
# mv statping-darwin-10.6-amd64 statping && tar -czvf statping-darwin-amd64.tar.gz statping && rm -f statping
|
|
||||||
# mv statping-linux-386 statping && tar -czvf statping-linux-386.tar.gz statping && rm -f statping
|
|
||||||
# mv statping-linux-amd64 statping && tar -czvf statping-linux-amd64.tar.gz statping && rm -f statping
|
|
||||||
# mv statping-linux-386 statping && tar -czvf statping-linux-386.tar.gz statping && rm -f statping
|
|
||||||
# mv statping-linux-arm-7 statping && tar -czvf statping-linux-arm-7.tar.gz statping && rm -f statping
|
|
||||||
# mv statping-linux-arm-6 statping && tar -czvf statping-linux-arm-6.tar.gz statping && rm -f statping
|
|
||||||
# mv statping-linux-arm64 statping && tar -czvf statping-linux-arm64.tar.gz statping && rm -f statping
|
|
||||||
# mv statping-windows-4.0-386.exe statping.exe && zip statping-windows-386.zip statping.exe && rm -f statping.exe
|
|
||||||
# mv statping-windows-4.0-amd64.exe statping.exe && zip statping-windows-amd64.zip statping.exe && rm -f statping.exe
|
|
||||||
#
|
|
||||||
# - name: Upload Releases
|
|
||||||
# id: upload-assets
|
|
||||||
# uses: softprops/action-gh-release@v1
|
|
||||||
# env:
|
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
# VERSION: ${{ env.VERSION }}
|
|
||||||
# with:
|
|
||||||
# tag_name: dev-v${{ env.VERSION }}
|
|
||||||
# draft: true
|
|
||||||
# prerelease: true
|
|
||||||
# files: |
|
|
||||||
# build/statping-darwin-amd64.tar.gz
|
|
||||||
# build/statping-linux-386.tar.gz
|
|
||||||
# build/statping-linux-amd64.tar.gz
|
|
||||||
# build/statping-linux-arm-6.tar.gz
|
|
||||||
# build/statping-linux-arm-7.tar.gz
|
|
||||||
# build/statping-linux-arm64.tar.gz
|
|
||||||
# build/statping-windows-386.zip
|
|
||||||
# build/statping-windows-amd64.zip
|
|
||||||
#
|
|
||||||
# - name: Upload Compiled Binaries to S3
|
|
||||||
# run: |
|
|
||||||
# aws s3 cp build/*.* s3://assets.statping.com/commit/${{ github.sha }}/
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue