From 30c1a8c4a0ae0dd81aa3f3acffa79b1c70208f27 Mon Sep 17 00:00:00 2001 From: kpym Date: Sat, 10 Oct 2020 12:17:48 +0200 Subject: [PATCH] add github actions to generates cross-platform executable files --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..477ef10 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +# workflow name +name: release + +# on events +on: + release: + types: + - created + +# jobs +jobs: + # generate build cross-platform build files + generate: + name: Generate cross-platform builds + runs-on: ubuntu-latest + steps: + # step 1: checkout repository code + - name: Checkout the repository + uses: actions/checkout@v2 + + # step 2: generate build files + - name: Generate build files + uses: thatisuday/go-build-action@v1 + with: + platforms: "linux/amd64, darwin/amd64, windows/amd64" + name: "urlencode" + compress: "true" + dest: "dist" + + # step 3: upload build-artifacts + - name: Upload build-artifacts + uses: skx/github-action-publish-binaries@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: "./dist/*.tar.gz"