-
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/github-actions'
- Loading branch information
Showing
2 changed files
with
119 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,30 @@ | ||
# .goreleaser.yaml | ||
builds: | ||
# You can have multiple builds defined as a yaml list | ||
- | ||
# ID of the build. | ||
# Defaults to the project name. | ||
id: "my-build" | ||
|
||
# Optionally override the matrix generation and specify only the final list of targets. | ||
# Format is `{goos}_{goarch}` with optionally a suffix with `_{goarm}` or `_{gomips}`. | ||
# This overrides `goos`, `goarch`, `goarm`, `gomips` and `ignores`. | ||
targets: | ||
- linux_amd64 | ||
- linux_386 | ||
- linux_arm_6 | ||
- linux_arm_7 | ||
- darwin_arm64 | ||
- darwin_amd64 | ||
- windows_arm | ||
- windows_amd64 | ||
- windows_386 | ||
|
||
# By default, GoRelaser will create your binaries inside `dist/${BuildID}_${BuildTarget}`, which is an unique directory per build target in the matrix. | ||
# You are able to set subdirs within that folder using the `binary` property. | ||
# | ||
# However, if for some reason you don't want that unique directory to be created, you can set this property. | ||
# If you do, you are responsible of keeping different builds from overriding each other. | ||
# | ||
# Defaults to `false`. | ||
#no_unique_dist_dir: true |
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,89 @@ | ||
name: goreleaser | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
# either 'goreleaser' (default) or 'goreleaser-pro' | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist --config ${{ github.workspace }}/.github/goreleaser.yml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution | ||
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} | ||
- | ||
name: Upload artifact dms_linux_amd64 | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dms_linux_amd64 | ||
path: dist/my-build_linux_amd64/dms | ||
- | ||
name: Upload artifact dms_linux_386 | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dms_linux_386 | ||
path: dist/my-build_linux_386/dms | ||
- | ||
name: Upload artifact dms_linux_arm_6 | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dms_linux_arm_6 | ||
path: dist/my-build_linux_arm_6/dms | ||
- | ||
name: Upload artifact dms_linux_arm_7 | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dms_linux_arm_7 | ||
path: dist/my-build_linux_arm_7/dms | ||
- | ||
name: Upload artifact dms_darwin_arm64 | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dms_darwin_arm64 | ||
path: dist/my-build_darwin_arm64/dms | ||
- | ||
name: Upload artifact dms_darwin_amd64 | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dms_darwin_amd64 | ||
path: dist/my-build_darwin_amd64/dms | ||
- | ||
name: Upload artifact dms_windows_arm.exe | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dms_windows_arm | ||
path: dist/my-build_windows_arm/dms.exe | ||
- | ||
name: Upload artifact dms_windows_amd64.exe | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dms_windows_amd64 | ||
path: dist/my-build_windows_amd64/dms.exe | ||
- | ||
name: Upload artifact dms_windows_386.exe | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dms_windows_386 | ||
path: dist/my-build_windows_386/dms.exe |