1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-01-10 00:43:53 +02:00
mailpit/.github/workflows/release-build.yml

49 lines
1.2 KiB
YAML
Raw Normal View History

2022-07-29 13:23:08 +02:00
on:
release:
types: [created]
name: Build & release
jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
2022-10-13 02:40:13 +02:00
goarch: ["386", amd64, arm, arm64]
2022-07-29 13:23:08 +02:00
exclude:
- goarch: "386"
goos: darwin
2022-10-13 02:18:49 +02:00
- goarch: "386"
2022-07-29 13:23:08 +02:00
goos: windows
2022-10-13 02:40:13 +02:00
- goarch: arm
goos: darwin
- goarch: arm
goos: windows
2022-07-29 13:23:08 +02:00
steps:
- uses: actions/checkout@v3
# build the assets
- uses: actions/setup-node@v3
with:
2022-10-14 22:35:06 +02:00
node-version: 18
2022-07-29 13:23:08 +02:00
cache: 'npm'
2022-10-14 22:31:29 +02:00
- run: echo "Building assets for ${{ github.ref_name }}"
2022-07-29 13:23:08 +02:00
- run: npm install
- run: npm run package
# build the binaries
- uses: wangyoucao577/go-release-action@v1.40
2022-07-29 13:23:08 +02:00
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
binary_name: "mailpit"
pre_command: export CGO_ENABLED=0
2022-07-29 13:54:45 +02:00
asset_name: mailpit-${{ matrix.goos }}-${{ matrix.goarch }}
2022-07-29 13:23:08 +02:00
extra_files: LICENSE README.md
2022-07-29 14:01:17 +02:00
md5sum: false
2022-10-14 22:31:29 +02:00
overwrite: true
retry: 5
ldflags: -w -X "github.com/axllent/mailpit/config.Version=${{ github.ref_name }}"