2024-01-17 05:37:46 +01:00
name : "Build Helper"
2024-01-08 08:48:10 +01:00
on : workflow_dispatch
2024-01-08 08:58:46 +01:00
env :
2024-03-07 02:41:01 +01:00
GO_VERSION : "1.22.0"
2024-01-29 18:39:36 +01:00
NODE_VERSION : "21.5.0"
2024-01-08 08:48:10 +01:00
jobs :
2024-02-23 03:24:28 +01:00
runbuild :
strategy :
matrix :
include :
- platform : "darwin"
2024-03-05 07:03:53 +01:00
arch : "universal"
2024-02-23 03:24:28 +01:00
runner : "macos-latest-xlarge"
scripthaus : "build-package"
- platform : "linux"
2024-03-05 07:03:53 +01:00
arch : "amd64"
2024-02-23 03:24:28 +01:00
runner : "ubuntu-latest"
scripthaus : "build-package-linux"
2024-08-07 20:42:37 +02:00
- platform : "linux"
arch : "arm64"
runner : ubuntu-24.04-arm64-16core
scripthaus : "build-package-linux"
2024-02-23 03:24:28 +01:00
runs-on : ${{ matrix.runner }}
2024-01-17 05:37:46 +01:00
steps :
- uses : actions/checkout@v4
- uses : actions/checkout@v4
with :
2024-01-29 18:39:36 +01:00
repository : scripthaus-dev/scripthaus
path : scripthaus
2024-03-07 01:07:48 +01:00
- name : Install Linux Build Dependencies (Linux only)
2024-03-05 07:03:53 +01:00
if : matrix.platform == 'linux'
run : |
sudo apt-get update
2024-03-08 23:05:21 +01:00
sudo apt-get install --no-install-recommends -y libarchive-tools libopenjp2-tools rpm
2024-08-07 20:42:37 +02:00
- name : Install FPM # The version of FPM that comes bundled with electron-builder doesn't include a Linux ARM target. Installing Gems onto the runner is super quick so we'll just do this for all targets.
run : sudo gem install fpm
2024-02-23 01:31:49 +01:00
- uses : actions/setup-go@v5
2024-01-17 05:37:46 +01:00
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-03-05 07:03:53 +01:00
- name : Install Scripthaus
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
2024-03-14 20:23:35 +01:00
echo $PWD >> $GITHUB_PATH
2024-01-17 05:37:46 +01:00
- uses : actions/setup-node@v4
with :
2024-01-29 18:39:36 +01:00
node-version : ${{env.NODE_VERSION}}
2024-05-02 23:13:32 +02:00
- name : Install yarn
run : |
corepack enable
yarn install
2024-03-05 07:03:53 +01:00
- name : Set Version
id : set-version
2024-02-24 02:44:00 +01:00
run : |
2024-02-24 00:14:25 +01:00
VERSION=$(node -e 'console.log(require("./version.js"))')
2024-02-24 02:44:00 +01:00
echo "WAVETERM_VERSION=${VERSION}" >> "$GITHUB_OUTPUT"
2024-03-05 07:03:53 +01:00
- name : Build ${{ matrix.platform }}/${{ matrix.arch }}
2024-03-14 20:23:35 +01:00
run : scripthaus run ${{ matrix.scripthaus }}
2024-03-05 07:03:53 +01:00
env :
GOARCH : ${{ matrix.arch }}
2024-08-07 20:44:53 +02:00
USE_SYSTEM_FPM : true # Ensure that the installed version of FPM is used rather than the bundled one.
2024-03-07 01:07:48 +01:00
CSC_LINK : ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_CERTIFICATE}}
CSC_KEY_PASSWORD : ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_CERTIFICATE_PWD }}
APPLE_ID : ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD : ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_NOTARIZATION_PWD }}
APPLE_TEAM_ID : ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
2024-03-07 02:22:43 +01:00
- name : Upload to S3 staging
run : aws s3 cp make/ s3://waveterm-github-artifacts/staging/${{ steps.set-version.outputs.WAVETERM_VERSION }}/ --recursive --exclude "*/*" --exclude "builder-*.yml"
2024-01-18 02:51:50 +01:00
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