-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
name: Release | ||
on: | ||
create: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v1 | ||
|
||
- name: Use Golang | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: "1.13.x" | ||
|
||
- name: Build cgo | ||
run: | | ||
go get github.com/monkeyWie/xgo | ||
~/go/bin/xgo -targets=windows/amd64,windows/386,linux/386,linux/amd64,linux/arm,linux/arm64,darwin/amd64, -ldflags="-w -s" -out=pocassist . | ||
mv pocassist-windows*386.exe pocassist_windows_386.exe | ||
mv pocassist-windows*amd64.exe pocassist_windows_amd64.exe | ||
mv pocassist-linux-*386 pocassist_linux_386 | ||
mv pocassist-linux-*amd64 pocassist_linux_amd64 | ||
mv pocassist-linux-*arm64 pocassist_linux_arm64 | ||
mv pocassist-linux-*arm-* pocassist_linux_arm | ||
mv pocassist-darwin-*amd64 pocassist_darwin_amd64 | ||
zip pocassist_windows_386.zip pocassist_windows_386.exe pocassist.db pocassist.sql config.yaml | ||
zip pocassist_windows_amd64.zip pocassist_windows_amd64.exe pocassist.db pocassist.sql config.yaml | ||
zip pocassist_linux_386.zip pocassist_linux_386 pocassist.db pocassist.sql config.yaml | ||
zip pocassist_linux_amd64.zip pocassist_linux_amd64 pocassist.db pocassist.sql config.yaml | ||
zip pocassist_linux_arm64.zip pocassist_linux_arm64 pocassist.db pocassist.sql config.yaml | ||
zip pocassist_linux_arm.zip pocassist_linux_arm pocassist.db pocassist.sql config.yaml | ||
zip pocassist_darwin_amd64.zip pocassist_darwin_amd64 pocassist.db pocassist.sql config.yaml | ||
- name: Create Release | ||
id: create_release | ||
uses: monkeyWie/create-release@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: true | ||
|
||
- name: Upload Release - Windows amd64 | ||
uses: actions/upload-release-asset@v1.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./pocassist_windows_amd64.zip | ||
asset_name: pocassist_windows_amd64.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload Release - Windows 386 | ||
uses: actions/upload-release-asset@v1.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./pocassist_windows_386.zip | ||
asset_name: pocassist_windows_386.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload Release - Linux amd64 | ||
uses: actions/upload-release-asset@v1.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./pocassist_linux_amd64.zip | ||
asset_name: pocassist_linux_amd64.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload Release - Linux 386 | ||
uses: actions/upload-release-asset@v1.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./pocassist_linux_386.zip | ||
asset_name: pocassist_linux_386.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload Release - Linux arm64 | ||
uses: actions/upload-release-asset@v1.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./pocassist_linux_arm64.zip | ||
asset_name: pocassist_linux_arm64.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload Release - Linux arm | ||
uses: actions/upload-release-asset@v1.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./pocassist_linux_arm.zip | ||
asset_name: pocassist_linux_arm.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload Release - Darwin amd64 | ||
uses: actions/upload-release-asset@v1.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./pocassist_darwin_amd64.zip | ||
asset_name: pocassist_darwin_amd64.zip | ||
asset_content_type: application/zip |