Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
Update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
jweny committed May 21, 2021
1 parent 3ba2eef commit 28feb2c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 58 deletions.
93 changes: 36 additions & 57 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,34 @@ jobs:
uses: actions/setup-go@v1
with:
go-version: "1.13.x"

- name: Build cgo

-
name: Build with xgo
uses: crazy-max/ghaction-xgo@v1
with:
xgo_version: latest
go_version: ${{ matrix.go_version }}
dest: build
prefix: myapp
targets: windows/amd64,windows/386,linux/386,linux/amd64,linux/arm,linux/arm64,darwin/amd64
v: true
x: false
race: false
ldflags: -s -w
buildmode: default

- name: Build zip
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 build/myapp-windows*386.exe pocassist_windows_386.exe
mv build/myapp-windows*amd64.exe pocassist_windows_amd64.exe
mv pocassist-windows*386.exe pocassist_windows_386.exe
mv pocassist-windows*amd64.exe pocassist_windows_amd64.exe
mv build/myapp-linux-*386 pocassist_linux_386
mv build/myapp-linux-*amd64 pocassist_linux_amd64
mv build/myapp-linux-*arm64 pocassist_linux_arm64
mv build/myapp-linux-*arm-* pocassist_linux_arm
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
mv build/myapp-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
Expand All @@ -53,72 +66,38 @@ jobs:
draft: false
prerelease: true

- name: Upload Release - Windows amd64
- name: Upload Release windows
uses: actions/[email protected]
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_path: ./pocassist-windows-x64.zip
asset_name: pocassist-${{ steps.create_release.outputs.tag }}-windows-x64.zip
asset_content_type: application/zip

- name: Upload Release - Windows 386
- name: Upload Release linux
uses: actions/[email protected]
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_path: ./pocassist-linux-x64.zip
asset_name: pocassist-${{ steps.create_release.outputs.tag }}-linux-x64.zip
asset_content_type: application/zip

- name: Upload Release - Linux amd64
- name: Upload Release cgo darwin
uses: actions/[email protected]
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_path: ./pocassist-darwin-x64.zip
asset_name: pocassist-${{ steps.create_release.outputs.tag }}-darwin-x64.zip
asset_content_type: application/zip

- name: Upload Release - Linux 386
uses: actions/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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


6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ pocassist分为两种模式:

`/pocassist_darwin_amd64 cli -h`

命令行参数详细说明、配置文件说明、web端操作可参考使用手册。
### 使用手册

命令行参数详细说明、配置文件说明、web端操作可参考[使用手册](https://github.com/jweny/pocassist/blob/master/docs/%E4%BD%BF%E7%94%A8%E6%89%8B%E5%86%8C.md)

## 常见问题

Expand Down Expand Up @@ -128,6 +130,8 @@ pocassist分为两种模式:
<p align="left">
<img alt="jweny wechat: bad-lucifer" src="docs/pic.assets/wechat.jpeg" width="150"/>
</p>


## 免责声明

未经授权,使用pocassist攻击目标是非法的。pocassist仅用于安全测试目的。为避免被恶意使用,本项目所有收录的poc均为漏洞的理论判断,不存在漏洞利用过程,不会对目标发起真实攻击和漏洞利用。
Expand Down

0 comments on commit 28feb2c

Please sign in to comment.