Skip to content

Commit

Permalink
Update release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
craciunoiuc authored Jul 31, 2022
1 parent d7c1c99 commit 6682f74
Showing 1 changed file with 29 additions and 17 deletions.
46 changes: 29 additions & 17 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
# .github/workflows/release.yaml

name: release

# on events
on:
release:
types: [created]
types:
- created

# jobs
jobs:
releases-matrix:
name: Release Go Binary
# generate build cross-platform build files
generate:
name: Generate cross-platform builds
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://dl.google.com/go/go1.18.1.linux-amd64.tar.gz"
project_path: "."
binary_name: "discord-bot"
extra_files: README.md
# 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, linux/arm64, windows/amd64"
name: "discord-bot"
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"

0 comments on commit 6682f74

Please sign in to comment.