name: "Build Helper" on: workflow_dispatch env: GO_VERSION: "1.21.5" NODE_VERSION: "21.5.0" jobs: runbuild: outputs: WAVETERM_VERSION: ${{ steps.set-version.outputs.WAVETERM_VERSION }} strategy: matrix: include: - platform: "darwin" arch: "x64" runner: "macos-latest" scripthaus: "build-package" - platform: "darwin" arch: "arm64" runner: "macos-latest-xlarge" scripthaus: "build-package" - platform: "linux" arch: "x64" runner: "ubuntu-latest" scripthaus: "build-package-linux" runs-on: ${{ matrix.runner }} steps: - uses: actions/checkout@v4 - uses: actions/checkout@v4 with: repository: scripthaus-dev/scripthaus path: scripthaus - uses: actions/setup-go@v5 with: go-version: ${{env.GO_VERSION}} cache-dependency-path: | wavesrv/go.sum waveshell/go.sum scripthaus/go.sum - run: | go work use ./scripthaus; cd scripthaus; go get ./...; CGO_ENABLED=1 go build -o scripthaus cmd/main.go - uses: actions/setup-node@v4 with: node-version: ${{env.NODE_VERSION}} cache: "yarn" - id: set-version run: | VERSION=$(node -e 'console.log(require("./version.js"))') echo "WAVETERM_VERSION=${VERSION}" >> "$GITHUB_OUTPUT" - run: yarn --frozen-lockfile - run: ./scripthaus/scripthaus run ${{ matrix.scripthaus }} - uses: actions/upload-artifact@v4 with: name: waveterm-build-${{ matrix.platform }}-${{ matrix.arch }} path: out/make/zip/${{ matrix.platform }}/${{ matrix.arch }}/*.zip retention-days: 2 upload: name: "Upload Builds" runs-on: ubuntu-latest needs: [runbuild] steps: - uses: actions/download-artifact@v4 with: merge-multiple: true path: buildtemp - run: | echo "${{ needs.runbuild.outputs.WAVETERM_VERSION }}" > buildtemp/version.txt - run: (cd buildtemp; zip ../waveterm-builds.zip *) - run: aws s3 cp waveterm-builds.zip s3://waveterm-github-artifacts/ env: AWS_ACCESS_KEY_ID: "${{ secrets.S3_USERID }}" AWS_SECRET_ACCESS_KEY: "${{ secrets.S3_SECRETKEY }}" AWS_DEFAULT_REGION: us-west-2