-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sd416
committed
Dec 17, 2024
1 parent
2b8235f
commit c25578a
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Release Go Binary | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
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.23" | ||
|
||
- name: Build Go Binary | ||
run: | | ||
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o file-encryptor-${{ matrix.goos }}-${{ matrix.goarch }} main.go | ||
- name: Upload Binaries | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
file-encryptor-${{ matrix.goos }}-${{ matrix.goarch }} | ||
LICENSE | ||
README.md | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |