-
-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (39 loc) · 1.16 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Release
on:
release:
types: [created]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64, arm64]
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22'
- name: Check out code
uses: actions/checkout@v2
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
go build -v -o deeplx-bot-${{ matrix.goos }}-${{ matrix.goarch }}
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: deeplx-bot-${{ matrix.goos }}-${{ matrix.goarch }}
path: deeplx-bot-${{ matrix.goos }}-${{ matrix.goarch }}
- name: Upload Artifact to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./deeplx-bot-${{ matrix.goos }}-${{ matrix.goarch }}
asset_name: deeplx-bot-${{ matrix.goos }}-${{ matrix.goarch }}
asset_content_type: application/octet-stream