2022-07-29 13:23:08 +02:00
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [created]
|
|
|
|
|
|
|
|
name: Build & release
|
|
|
|
jobs:
|
|
|
|
releases-matrix:
|
2023-10-06 06:18:38 +02:00
|
|
|
name: Build
|
2022-07-29 13:23:08 +02:00
|
|
|
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:
|
2023-10-01 10:24:24 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-07-29 13:23:08 +02:00
|
|
|
|
|
|
|
# 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
|
2023-09-02 12:14:44 +02:00
|
|
|
- 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"
|
2022-08-04 10:46:39 +02:00
|
|
|
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
|
2023-06-14 12:33:36 +02:00
|
|
|
retry: 5
|
2022-10-16 01:12:28 +02:00
|
|
|
ldflags: -w -X "github.com/axllent/mailpit/config.Version=${{ github.ref_name }}"
|