-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.1 KB
/
release.yml
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
46
name: Release Go Binary
on:
release:
types: [created]
workflow_dispatch:
permissions:
contents: write
packages: write
jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: ["386", amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: arm64
goos: windows
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set Up Go
uses: actions/setup-go@v4
with:
go-version: "1.20" # Specify Go version
- name: Build Go Binary
run: |
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o file-encryptor-${{ matrix.goos }}-${{ matrix.goarch }} ./cmd/file-encryptor
- name: Upload Release Assets
uses: softprops/action-gh-release@v1
with:
files: |
file-encryptor-${{ matrix.goos }}-${{ matrix.goarch }}
LICENSE
README.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}