-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add pkg-binary edging and start to rework dev-release
- Loading branch information
Showing
2 changed files
with
27 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,75 +8,26 @@ on: | |
|
||
jobs: | ||
package: | ||
runs-on: ${{ matrix.runner }} | ||
env: | ||
TERM: xterm | ||
uses: ./.github/workflows/pkg-binary.yml | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: | ||
- '20' | ||
arch: | ||
- x64 | ||
- arm64 | ||
os: | ||
- linux | ||
- macos | ||
- win | ||
runner: | ||
- macos-14 | ||
- ubuntu-24.04 | ||
type: | ||
- '-slim' | ||
- '' | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install node ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: npm | ||
- name: Install dependencies | ||
run: npm clean-install --prefer-offline --frozen-lockfile --production | ||
- name: Install fatcore | ||
if: matrix.type == '' | ||
run: scripts/fatcore-install.sh --edge | ||
- name: Switch to edge channel | ||
run: | | ||
sed -i.bak "s/^channel: stable/channel: edge/" config.yml | ||
rm -rf config.yml.bak | ||
- name: Prepare Release | ||
uses: lando/prepare-release-action@v3 | ||
with: | ||
version: dev | ||
sync: false | ||
- name: Package into node binary | ||
uses: lando/pkg-action@v5 | ||
with: | ||
entrypoint: bin/lando | ||
node-version: ${{ matrix.node-version }} | ||
os: ${{ matrix.os }} | ||
options: --options dns-result-order=ipv4first | ||
pkg: "@yao-pkg/[email protected]" | ||
upload-key: "lando-${{ matrix.os }}-${{ matrix.runner == 'macos-14' && 'arm64' || 'x64' }}${{ matrix.type }}-${{ github.sha }}" | ||
- name: Ensure version | ||
if: (matrix.os == 'linux' && runner.os == 'Linux') || (matrix.os == 'macos' && runner.os == 'macOS') | ||
run: ./dist/@lando/core version --all | ||
- name: Ensure ipv4first | ||
if: (matrix.os == 'linux' && runner.os == 'Linux') || (matrix.os == 'macos' && runner.os == 'macOS') | ||
run: ./dist/@lando/core config --path cli.args | grep dns-result-order=ipv4first | ||
- name: Ensure edge channel | ||
if: (matrix.os == 'linux' && runner.os == 'Linux') || (matrix.os == 'macos' && runner.os == 'macOS') | ||
run: ./dist/@lando/core config --path channel | grep edge | ||
- name: Ensure slimcore | ||
if: ((matrix.os == 'linux' && runner.os == 'Linux') || (matrix.os == 'macos' && runner.os == 'macOS')) && matrix.type == '-slim' | ||
run: ./dist/@lando/core config --path fatcore | grep false | ||
- name: Ensure fatcore | ||
if: ((matrix.os == 'linux' && runner.os == 'Linux') || (matrix.os == 'macos' && runner.os == 'macOS')) && matrix.type == '' | ||
run: | | ||
./dist/@lando/core config --path fatcore | grep true | ||
./dist/@lando/core config | grep -q "node_modules/@lando/wordpress" | ||
fatcore: | ||
- false | ||
- edge | ||
with: | ||
arch: ${{ matrix.arch }} | ||
fatcore: ${{ matrix.fatcore }} | ||
filename: lando-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.fatcore == 'false' && '-slim' || '' }}-${{ github.sha }} | ||
node-version: "20" | ||
os: ${{ matrix.os }} | ||
|
||
sign-n-deploy: | ||
runs-on: ${{ matrix.os }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,10 +24,10 @@ on: | |
required: false | ||
type: string | ||
fatcore: | ||
default: false | ||
default: 'false' | ||
description: Whether to build a fat binary or not | ||
required: false | ||
type: boolean | ||
type: string | ||
|
||
jobs: | ||
pkg-binary: | ||
|
@@ -47,8 +47,13 @@ jobs: | |
- name: Install dependencies | ||
run: npm clean-install --prefer-offline --frozen-lockfile --production | ||
- name: Install fatcore | ||
if: inputs.fatcore == true | ||
run: scripts/fatcore-install.sh | ||
if: inputs.fatcore == 'true' || inputs.fatcore == 'edge' | ||
run: scripts/fatcore-install.sh ${{ inputs.fatcore == 'edge' && '--edge' || '' }} | ||
- name: Switch to edge channel | ||
if: inputs.fatcore == 'edge' | ||
run: | | ||
sed -i.bak "s/^channel: stable/channel: edge/" config.yml | ||
rm -rf config.yml.bak | ||
- name: Prepare Release | ||
uses: lando/prepare-release-action@v3 | ||
with: | ||
|
@@ -63,21 +68,21 @@ jobs: | |
os: ${{ inputs.os }} | ||
options: --options dns-result-order=ipv4first | ||
pkg: "@yao-pkg/[email protected]" | ||
upload-key: "lando-${{ inputs.os }}-${{ inputs.arch }}${{ inputs.fatcore == true && '' || '-slim' }}-${{ github.sha }}" | ||
upload-key: "lando-${{ inputs.os }}-${{ inputs.arch }}${{ inputs.fatcore == 'true' && '' || '-slim' }}-${{ github.sha }}" | ||
- name: Ensure version | ||
if: (inputs.os == 'linux' && runner.os == 'Linux') || (inputs.os == 'macos' && runner.os == 'macOS') | ||
run: ./dist/${{ inputs.filename }} version --all | ||
- name: Ensure ipv4first | ||
if: (inputs.os == 'linux' && runner.os == 'Linux') || (inputs.os == 'macos' && runner.os == 'macOS') | ||
run: ./dist/${{ inputs.filename }} config --path cli.args | grep dns-result-order=ipv4first | ||
- name: Ensure stable channel | ||
- name: Ensure channel | ||
if: (inputs.os == 'linux' && runner.os == 'Linux') || (inputs.os == 'macos' && runner.os == 'macOS') | ||
run: ./dist/${{ inputs.filename }} config --path channel | grep stable | ||
run: ./dist/${{ inputs.filename }} config --path channel | grep ${{ inputs.fatcore == 'edge' && 'edge' || 'stable' }} | ||
- name: Ensure slimcore | ||
if: ((inputs.os == 'linux' && runner.os == 'Linux') || (inputs.os == 'macos' && runner.os == 'macOS')) && inputs.fatcore == false | ||
if: ((inputs.os == 'linux' && runner.os == 'Linux') || (inputs.os == 'macos' && runner.os == 'macOS')) && inputs.fatcore == 'false' | ||
run: ./dist/${{ inputs.filename }} config --path fatcore | grep false | ||
- name: Ensure fatcore | ||
if: ((inputs.os == 'linux' && runner.os == 'Linux') || (inputs.os == 'macos' && runner.os == 'macOS')) && inputs.fatcore == true | ||
if: ((inputs.os == 'linux' && runner.os == 'Linux') || (inputs.os == 'macos' && runner.os == 'macOS')) && inputs.fatcore == 'true' | ||
run: | | ||
./dist/${{ inputs.filename }} config --path fatcore | grep true | ||
./dist/${{ inputs.filename }} config | grep -q "node_modules/@lando/wordpress" |