waveterm/.github/workflows/build-helper.yml

101 lines
3.8 KiB
YAML
Raw Permalink Normal View History

name: "Build Helper"
on: workflow_dispatch
2024-01-08 08:58:46 +01:00
env:
2024-01-29 18:39:36 +01:00
WAVETERM_VERSION: 0.6.1
GO_VERSION: "1.21.5"
NODE_VERSION: "21.5.0"
jobs:
runbuild-darwin-x64:
2024-01-08 09:12:07 +01:00
name: "Build MacOS x64"
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
2024-01-29 18:39:36 +01:00
go-version: ${{env.GO_VERSION}}
cache-dependency-path: |
wavesrv/go.sum
waveshell/go.sum
- run: brew tap scripthaus-dev/scripthaus
- run: brew install scripthaus
2024-01-08 09:12:07 +01:00
- uses: actions/setup-node@v4
with:
2024-01-29 18:39:36 +01:00
node-version: ${{env.NODE_VERSION}}
cache: "yarn"
- run: yarn --frozen-lockfile
- run: scripthaus run build-package
- uses: actions/upload-artifact@v4
2024-01-08 08:58:46 +01:00
with:
2024-01-29 18:39:36 +01:00
name: waveterm-build-darwin-x64
path: out/make/zip/darwin/x64/*.zip
retention-days: 2
runbuild-darwin-arm64:
2024-01-08 09:35:38 +01:00
name: "Build MacOS arm64"
runs-on: macos-latest-xlarge
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
2024-01-29 18:39:36 +01:00
go-version: ${{env.GO_VERSION}}
cache-dependency-path: |
wavesrv/go.sum
waveshell/go.sum
2024-01-08 09:35:38 +01:00
- run: brew tap scripthaus-dev/scripthaus
- run: brew install scripthaus
- uses: actions/setup-node@v4
with:
2024-01-29 18:39:36 +01:00
node-version: ${{env.NODE_VERSION}}
cache: "yarn"
2024-01-08 09:35:38 +01:00
- run: yarn --frozen-lockfile
- run: scripthaus run build-package
- uses: actions/upload-artifact@v4
2024-01-08 09:35:38 +01:00
with:
2024-01-29 18:39:36 +01:00
name: waveterm-build-darwin-arm64
path: out/make/zip/darwin/arm64/*.zip
retention-days: 2
runbuild-linux:
name: "Build Linux x64"
runs-on: ubuntu-latest
needs: [runbuild-darwin-x64, runbuild-darwin-arm64]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
2024-01-29 18:39:36 +01:00
repository: scripthaus-dev/scripthaus
path: scripthaus
- uses: actions/setup-go@v4
with:
2024-01-29 18:39:36 +01:00
go-version: ${{env.GO_VERSION}}
cache-dependency-path: |
wavesrv/go.sum
waveshell/go.sum
scripthaus/go.sum
2024-01-17 06:46:44 +01:00
- run: |
2024-01-29 18:39:36 +01:00
go work use ./scripthaus;
cd scripthaus;
go get ./...;
CGO_ENABLED=1 go build -o scripthaus cmd/main.go
- uses: actions/setup-node@v4
with:
2024-01-29 18:39:36 +01:00
node-version: ${{env.NODE_VERSION}}
cache: "yarn"
- run: yarn --frozen-lockfile
- run: ./scripthaus/scripthaus run build-package-linux
- uses: actions/download-artifact@v4
with:
2024-01-29 18:39:36 +01:00
merge-multiple: true
path: buildtemp
- run: |
2024-01-29 18:39:36 +01:00
mv out/make/zip/linux/x64/Wave-linux-x64-$WAVETERM_VERSION.zip buildtemp/waveterm-linux-x64-v$WAVETERM_VERSION.zip
- run: (cd buildtemp; zip ../waveterm-builds.zip *)
- run: aws s3 cp waveterm-builds.zip s3://waveterm-github-artifacts/
env:
2024-01-29 18:39:36 +01:00
AWS_ACCESS_KEY_ID: "${{ secrets.S3_USERID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.S3_SECRETKEY }}"
AWS_DEFAULT_REGION: us-west-2
- uses: actions/upload-artifact@v4
with:
2024-01-29 18:39:36 +01:00
name: waveterm-builds
path: buildtemp
retention-days: 2