v3.23.4 #111
Workflow file for this run
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
name: Create Releases | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
package: | |
runs-on: ${{ matrix.runner }} | |
env: | |
TERM: xterm | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: | |
- '20' | |
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: | | |
if [ "${{ github.event.release.prerelease }}" == "true" ]; then | |
./scripts/fatcore-install.sh --edge | |
else | |
./scripts/fatcore-install.sh | |
fi | |
- name: Switch to edge channel | |
if: github.event.release.prerelease == true | |
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: | |
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')) && github.event.release.prerelease == true | |
run: ./dist/@lando/core config --path channel | grep edge | |
- name: Ensure stable channel | |
if: ((matrix.os == 'linux' && runner.os == 'Linux') || (matrix.os == 'macos' && runner.os == 'macOS')) && github.event.release.prerelease == false | |
run: ./dist/@lando/core config --path channel | grep stable | |
- 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" | |
sign-n-deploy: | |
runs-on: ${{ matrix.os }} | |
needs: | |
- package | |
env: | |
TERM: xterm | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-2022 | |
key: lando-win-x64-${{ github.sha }} | |
file: lando/core.exe | |
certificate-data: KEYLOCKER_CLIENT_CERT | |
certificate-password: KEYLOCKER_CLIENT_CERT_PASSWORD | |
result: lando-win-x64-${{ github.ref_name }}.exe | |
- os: windows-2022 | |
key: lando-win-arm64-${{ github.sha }} | |
file: lando/core.exe | |
certificate-data: KEYLOCKER_CLIENT_CERT | |
certificate-password: KEYLOCKER_CLIENT_CERT_PASSWORD | |
result: lando-win-arm64-${{ github.ref_name }}.exe | |
- os: windows-2022 | |
key: lando-win-x64-slim-${{ github.sha }} | |
file: lando/core.exe | |
certificate-data: KEYLOCKER_CLIENT_CERT | |
certificate-password: KEYLOCKER_CLIENT_CERT_PASSWORD | |
result: lando-win-x64-${{ github.ref_name }}-slim.exe | |
- os: windows-2022 | |
key: lando-win-arm64-slim-${{ github.sha }} | |
file: lando/core.exe | |
certificate-data: KEYLOCKER_CLIENT_CERT | |
certificate-password: KEYLOCKER_CLIENT_CERT_PASSWORD | |
result: lando-win-arm64-${{ github.ref_name }}-slim.exe | |
- os: macos-14 | |
key: lando-macos-x64-${{ github.sha }} | |
file: lando/core | |
certificate-data: APPLE_CERT_DATA | |
certificate-password: APPLE_CERT_PASSWORD | |
apple-product-id: dev.lando.cli | |
apple-team-id: FY8GAUX282 | |
apple-notary-user: APPLE_NOTARY_USER | |
apple-notary-password: APPLE_NOTARY_PASSWORD | |
options: --options runtime --entitlements entitlements.xml | |
result: lando-macos-x64-${{ github.ref_name }} | |
- os: macos-14 | |
key: lando-macos-arm64-${{ github.sha }} | |
file: lando/core | |
certificate-data: APPLE_CERT_DATA | |
certificate-password: APPLE_CERT_PASSWORD | |
apple-product-id: dev.lando.cli | |
apple-team-id: FY8GAUX282 | |
apple-notary-user: APPLE_NOTARY_USER | |
apple-notary-password: APPLE_NOTARY_PASSWORD | |
options: --options runtime --entitlements entitlements.xml | |
result: lando-macos-arm64-${{ github.ref_name }} | |
- os: macos-14 | |
key: lando-macos-x64-slim-${{ github.sha }} | |
file: lando/core | |
certificate-data: APPLE_CERT_DATA | |
certificate-password: APPLE_CERT_PASSWORD | |
apple-product-id: dev.lando.cli | |
apple-team-id: FY8GAUX282 | |
apple-notary-user: APPLE_NOTARY_USER | |
apple-notary-password: APPLE_NOTARY_PASSWORD | |
options: --options runtime --entitlements entitlements.xml | |
result: lando-macos-x64-${{ github.ref_name }}-slim | |
- os: macos-14 | |
key: lando-macos-arm64-slim-${{ github.sha }} | |
file: lando/core | |
certificate-data: APPLE_CERT_DATA | |
certificate-password: APPLE_CERT_PASSWORD | |
apple-product-id: dev.lando.cli | |
apple-team-id: FY8GAUX282 | |
apple-notary-user: APPLE_NOTARY_USER | |
apple-notary-password: APPLE_NOTARY_PASSWORD | |
options: --options runtime --entitlements entitlements.xml | |
result: lando-macos-arm64-${{ github.ref_name }}-slim | |
- os: ubuntu-24.04 | |
key: lando-linux-x64-${{ github.sha }} | |
file: lando/core | |
certificate-data: KEYLOCKER_CLIENT_CERT | |
certificate-password: KEYLOCKER_CLIENT_CERT_PASSWORD | |
result: lando-linux-x64-${{ github.ref_name }} | |
- os: ubuntu-24.04 | |
key: lando-linux-arm64-${{ github.sha }} | |
file: lando/core | |
certificate-data: KEYLOCKER_CLIENT_CERT | |
certificate-password: KEYLOCKER_CLIENT_CERT_PASSWORD | |
result: lando-linux-arm64-${{ github.ref_name }} | |
- os: ubuntu-24.04 | |
key: lando-linux-x64-slim-${{ github.sha }} | |
file: lando/core | |
certificate-data: KEYLOCKER_CLIENT_CERT | |
certificate-password: KEYLOCKER_CLIENT_CERT_PASSWORD | |
result: lando-linux-x64-${{ github.ref_name }}-slim | |
- os: ubuntu-24.04 | |
key: lando-linux-arm64-slim-${{ github.sha }} | |
file: lando/core | |
certificate-data: KEYLOCKER_CLIENT_CERT | |
certificate-password: KEYLOCKER_CLIENT_CERT_PASSWORD | |
result: lando-linux-arm64-${{ github.ref_name }}-slim | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download ${{ matrix.key }} | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{ matrix.key }} | |
path: lando | |
- name: Sign and Notarize | |
uses: lando/code-sign-action@v2 | |
id: code-sign-action | |
with: | |
file: ${{ matrix.file }} | |
certificate-data: ${{ secrets[matrix.certificate-data] }} | |
certificate-password: ${{ secrets[matrix.certificate-password] }} | |
apple-notary-user: ${{ secrets[matrix.apple-notary-user] }} | |
apple-notary-password: ${{ secrets[matrix.apple-notary-password] }} | |
apple-product-id: ${{ matrix.apple-product-id }} | |
apple-team-id: ${{ matrix.apple-team-id }} | |
keylocker-host: https://clientauth.one.digicert.com | |
keylocker-api-key: ${{ secrets.KEYLOCKER_API_KEY }} | |
keylocker-cert-sha1-hash: ${{ secrets.KEYLOCKER_CERT_SHA1_HASH }} | |
keylocker-keypair-alias: ${{ secrets.KEYLOCKER_KEYPAIR_ALIAS }} | |
options: ${{ matrix.options }} | |
- name: Rename as needed | |
shell: bash | |
run: | | |
# naming things | |
mkdir -p releases | |
cp ${{ steps.code-sign-action.outputs.file }} releases/${{ matrix.result }} | |
# if a latest release then push to stable tag | |
if [ "${{ github.event.release.prerelease }}" == "false" ]; then | |
cp releases/${{ matrix.result }} "releases/$(echo ${{ matrix.result }} | sed 's/${{ github.ref_name }}/stable/;')" | |
fi | |
# both latest/stable should push to edge | |
cp releases/${{ matrix.result }} "releases/$(echo ${{ matrix.result }} | sed 's/${{ github.ref_name }}/edge/;')" | |
# exec and confirm | |
chmod +x releases/* | |
ls -lsa releases | |
- name: Configure S3 Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.S3_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.S3_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: Upload releases to S3 | |
shell: bash | |
run: | | |
aws s3 sync releases s3://files.lando.dev/ | |
aws s3 sync releases s3://files.lando.dev/cli | |
aws s3 sync releases s3://files.lando.dev/core | |
- name: Upload releases to GitHub Releases | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: releases/${{ matrix.result }} | |
fail_on_unmatched_files: true | |
- name: Upload to artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
retention-days: 1 | |
name: ${{ matrix.key }} | |
overwrite: true | |
path: releases/* | |
bump-and-npm: | |
runs-on: ${{ matrix.os }} | |
needs: | |
- sign-n-deploy | |
env: | |
TERM: xterm | |
strategy: | |
matrix: | |
os: | |
- ubuntu-24.04 | |
node-version: | |
- '20' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install node ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: https://registry.npmjs.org | |
cache: npm | |
- name: Install dependencies | |
run: npm clean-install --prefer-offline --frozen-lockfile | |
- name: Lint code | |
run: npm run lint | |
- name: Run unit tests | |
run: npm run test:unit | |
- name: Update release helpers | |
shell: bash | |
run: | | |
if [[ ${{ github.event.release.tag_name }} == v3* ]]; then | |
echo "${{ github.event.release.tag_name }}" > release-aliases/3-EDGE | |
if [ "${{ github.event.release.prerelease }}" == "false" ]; then | |
echo "${{ github.event.release.tag_name }}" > release-aliases/3-STABLE | |
fi | |
fi | |
- name: Prepare Release | |
uses: lando/prepare-release-action@v3 | |
with: | |
lando-plugin: true | |
sync-token: ${{ secrets.RTFM47_COAXIUM_INJECTOR }} | |
sync-email: [email protected] | |
sync-username: rtfm-47 | |
- name: Publish to npm | |
run: | | |
VERSION=$(node -p "require('./package.json').version") | |
PACKAGE=$(node -p "require('./package.json').name") | |
if [ "${{ github.event.release.prerelease }}" == "false" ]; then | |
npm publish --access public --dry-run | |
npm publish --access public | |
npm dist-tag add "$PACKAGE@$VERSION" edge | |
echo "::notice title=Published $VERSION to $PACKAGE::This is a stable release published to the default 'latest' npm tag" | |
echo "::notice title=Updated latest tag to $VERSION::The stable tag now points to $VERSION" | |
echo "::notice title=Updated edge tag to $VERSION::The edge tag now points to $VERSION" | |
else | |
npm publish --access public --tag edge --dry-run | |
npm publish --access public --tag edge | |
echo "::notice title=Published $VERSION to $PACKAGE::This is a prerelease published to the 'edge' npm tag" | |
echo "::notice title=Updated edge tag to $VERSION::The edge tag now points to $VERSION" | |
fi | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_DEPLOY_TOKEN }} | |
- name: Push release to lando/lando | |
uses: softprops/action-gh-release@v2 | |
with: | |
repository: lando/lando | |
name: ${{ github.event.release.tag_name }} | |
draft: ${{ github.event.release.draft }} | |
prerelease: ${{ github.event.release.prerelease }} | |
tag_name: ${{ github.event.release.tag_name }} | |
token: ${{ secrets.RTFM47_COAXIUM_INJECTOR }} | |
body: | | |
**Starting with v3.21.0-beta.18, Lando is no longer distributed via package installers in here in this releases page!** | |
To install Lando please visit the [official install docs](https://docs.lando.dev/install). | |
## Changelogs | |
Lando now runs as a distributed plugin-based ecosystem so you will want to check the releases/changelogs in | |
the various [plugins](https://docs.lando.dev/plugins.html) for relevant notes. | |
[Click Here](https://github.com/lando/core/releases/tag/${{ github.event.release.tag_name }}) to check out the notes for `@lando/core@${{ github.event.release.tag_name }}`. | |
## Notes | |
* We will continue to push releases here for backwards compatibility, posterity, etc | |
* [Extended release notes](https://lando.dev/blog/2024/01/16/v321-extended.html) | |
- name: Push release to lando/cli | |
uses: softprops/action-gh-release@v2 | |
with: | |
repository: lando/cli | |
name: ${{ github.event.release.tag_name }} | |
draft: ${{ github.event.release.draft }} | |
prerelease: ${{ github.event.release.prerelease }} | |
tag_name: ${{ github.event.release.tag_name }} | |
token: ${{ secrets.RTFM47_COAXIUM_INJECTOR }} | |
body: | | |
**Starting with v3.23.0, Lando CLI binaries are no longer distributed here in these releases!** | |
They are now available in the `@lando/core` [releases page](https://github.com/lando/core/releases) including [this ${{ github.event.release.tag_name }} release](https://github.com/lando/core/releases/tag/${{ github.event.release.tag_name }}). | |
All that said we don't recommned you use these binaries directly. Instead, to install Lando please visit the [official install docs](https://docs.lando.dev/install). | |
verify: | |
runs-on: ${{ matrix.os }} | |
needs: | |
- sign-n-deploy | |
env: | |
TERM: xterm | |
strategy: | |
matrix: | |
os: | |
- ubuntu-24.04 | |
node-version: | |
- '20' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download for checksumming | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: Combine artifacts | |
run: | | |
mkdir -p dist | |
find "artifacts" -mindepth 2 -maxdepth 2 -type f -exec mv {} "dist" \; | |
ls -lsa dist | |
- name: Checksum artifacts | |
run: ./scripts/generate-checksums.sh --directory dist --output sha256sum.txt --show | |
- name: Configure S3 credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.S3_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.S3_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: Upload checksums to S3 | |
shell: bash | |
run: | | |
aws s3 cp sha256sum.txt s3://files.lando.dev/sha256sum-${{ github.ref_name }}.txt | |
aws s3 cp sha256sum.txt s3://files.lando.dev/cli/sha256sum-${{ github.ref_name }}.txt | |
aws s3 cp sha256sum.txt s3://files.lando.dev/core/sha256sum-${{ github.ref_name }}.txt | |
- name: Upload checksums to GitHub Releases | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: sha256sum.txt | |
fail_on_unmatched_files: true |