Skip to content

Commit

Permalink
chore(deployment): Package publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
florianPat committed Mar 4, 2025
1 parent 0023929 commit 11cc82a
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 270 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-util-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Build Utility Images
on:
# Uncomment below for testing purposes
pull_request:
push:
branches:
- main
#push:
# branches:
# - main

jobs:
buildx:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/dev-release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Create Dev Releases

on:
push:
branches:
- main
- 'preview-**'
workflow_call:

jobs:
package:
Expand Down
251 changes: 46 additions & 205 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,214 +6,55 @@ on:
- created

jobs:
package:
uses: ./.github/workflows/pkg-binary.yml
strategy:
fail-fast: false
matrix:
arch:
- x64
- arm64
os:
- linux
- macos
- win
fatcore:
- false
- true
with:
arch: ${{ matrix.arch }}
edge: ${{ github.event.release.prerelease }}
fatcore: ${{ matrix.fatcore }}
filename: lando-${{ matrix.os }}-${{ matrix.arch }}-${{ github.ref_name }}${{ matrix.fatcore == false && '-slim' || '' }}
node-version: "20"
os: ${{ matrix.os }}
version: ${{ github.event.release.tag_name }}

sign:
uses: ./.github/workflows/sign-binary.yml
needs:
- package
strategy:
fail-fast: false
matrix:
file:
- lando-linux-arm64-${{ github.ref_name }}
- lando-macos-arm64-${{ github.ref_name }}
- lando-win-arm64-${{ github.ref_name }}

- lando-linux-x64-${{ github.ref_name }}
- lando-macos-x64-${{ github.ref_name }}
- lando-win-x64-${{ github.ref_name }}

- lando-linux-arm64-${{ github.ref_name }}-slim
- lando-macos-arm64-${{ github.ref_name }}-slim
- lando-win-arm64-${{ github.ref_name }}-slim

- lando-linux-x64-${{ github.ref_name }}-slim
- lando-macos-x64-${{ github.ref_name }}-slim
- lando-win-x64-${{ github.ref_name }}-slim
with:
download-pattern: packaged-lando-*
file: ${{ matrix.file }}
secrets:
apple-notary-user: ${{ secrets.APPLE_NOTARY_USER }}
apple-notary-password: ${{ secrets.APPLE_NOTARY_PASSWORD }}
certificate-data: ${{ contains(matrix.file, 'macos') && secrets.APPLE_CERT_DATA || secrets.KEYLOCKER_CLIENT_CERT }}
certificate-password: ${{ contains(matrix.file, 'macos') && secrets.APPLE_CERT_PASSWORD || secrets.KEYLOCKER_CLIENT_CERT_PASSWORD }}
keylocker-api-key: ${{ secrets.KEYLOCKER_API_KEY }}
keylocker-cert-sha1-hash: ${{ secrets.KEYLOCKER_CERT_SHA1_HASH }}
keylocker-keypair-alias: ${{ secrets.KEYLOCKER_KEYPAIR_ALIAS }}

build-release-binary-alias:
uses: ./.github/workflows/release-rename-binary.yml
needs:
- sign
strategy:
fail-fast: false
matrix:
arch:
- x64
- arm64
os:
- linux
- macos
- win
type:
- -slim
-
alias: ${{ github.event.release.prerelease == true && fromJson('["edge"]') || fromJson('["stable", "edge"]') }}

with:
source: lando-${{ matrix.os }}-${{ matrix.arch }}-${{ github.ref_name }}${{ matrix.type }}
destination: lando-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.alias }}${{ matrix.type }}
download-pattern: signed-lando-*
build-release-binary-tag:
uses: ./.github/workflows/release-rename-binary.yml
needs:
- sign
bump-and-npm:
runs-on: ${{ matrix.os }}
env:
TERM: xterm
strategy:
fail-fast: false
matrix:
arch:
- x64
- arm64
os:
- linux
- macos
- win
type:
- -slim
-
with:
source: lando-${{ matrix.os }}-${{ matrix.arch }}-${{ github.ref_name }}${{ matrix.type }}
destination: lando-${{ matrix.os }}-${{ matrix.arch }}-${{ github.ref_name }}${{ matrix.type }}
download-pattern: signed-lando-*

checksum:
uses: ./.github/workflows/generate-checksums.yml
needs:
- build-release-binary-alias
- build-release-binary-tag
with:
download-pattern: release-*-${{ github.ref_name }}*
flatten: true
show: true
upload-name: release-checksums-${{ github.ref_name }}
checksum-s3-aliases:
uses: ./.github/workflows/generate-checksums.yml
strategy:
fail-fast: false
matrix:
alias:
- edge
- ${{ github.event.release.prerelease == false && 'stable' || 'prerelease' }}
- ${{ github.ref_name }}
needs:
- build-release-binary-alias
- build-release-binary-tag
with:
download-pattern: release-*-${{ github.ref_name }}*
output: sha256sum-${{ matrix.alias }}.txt
flatten: true
show: true
upload-name: release-checksums${{ matrix.alias }}

deploy-releases-s3:
uses: ./.github/workflows/deploy-s3.yml
needs:
- checksum
- checksum-s3-aliases
with:
download-pattern: release-*
secrets:
aws-secret-access-key: ${{ secrets.S3_SECRET_ACCESS_KEY }}
aws-access-key-id: ${{ secrets.S3_ACCESS_KEY_ID }}
aws-region: us-east-1
deploy-releases-artifacts:
uses: ./.github/workflows/deploy-artifacts.yml
needs:
- checksum
with:
download-pattern: release-*
deploy-releases-releases:
uses: ./.github/workflows/deploy-releases.yml
needs:
- checksum
with:
download-pattern: release-*-${{ github.ref_name }}*
deploy-npm:
uses: ./.github/workflows/deploy-npm.yml
needs:
- checksum
secrets:
github-token: ${{ secrets.RTFM47_COAXIUM_INJECTOR }}
npm-token: ${{ secrets.NPM_DEPLOY_TOKEN }}
deploy-legacy-notifications:
runs-on: ubuntu-24.04
needs:
- checksum
env:
TERM: xterm
- ubuntu-24.04
node-version:
- '20'
steps:
- name: Push release to lando/lando
uses: softprops/action-gh-release@v2
- name: Checkout code
uses: actions/checkout@v4
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v4
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
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: Prepare Release
uses: lando/prepare-release-action@v3
with:
repository: lando/legacy-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).
lando-plugin: true
sync: false
- 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 }}
50 changes: 3 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,5 @@
# Lando Core
# Flos Lando Core

These are the core libraries that power Lando. They are implemented in [`@lando/cli`] and things like [Pantheon LocalDev](https://pantheon.io/product/localdev) and [WordPress VIP CLI](https://github.com/Automattic/vip-cli/blob/develop/package.json).
These are the core libraries that power flos version of Lando with seamless compose integration.

On a high level they serve as:

**An abstraction layer** Lando vastly reduces the complexity of spinning up containers by exposing only the most relevant config for a given "service" and setting "sane defaults". Lando also provides "recipes" which are common combinations of services and their tooling that satisfy a given development use case - e.g. Drupal, Python, Laravel, Dotnet, etc.

**A superset** Lando provides ways for developers to run complex commands, build steps and automation on their services without the hassle of custom Dockerfiles or long "docker exec" commands. Think `lando yarn add express`. Think clear my applications cache after I import a database. Think install this core-extension before my appserver starts and then `composer install` after it does.

**A utility** Lando handles some of the more arduous configuration required for a good Docker Compose setup - e.g. proxying, nice urls, cross-application networking (think Vue.js frontend talking to a separate Laravel backend), host-container file permission handling, file sharing, per-container SSL certificate handling, ssh-key handling, etc.

## Basic Usage

```js
const Lando = require('@lando/core');
const lando = new Lando(config);

// bootstrap and go
return lando.bootstrap(bsLevel).then(lando => {
lando.getApp().init().then(() => cli.run(getTasks(config, cli.argv()), config));
});
const
```

For more info you should check out the [docs](https://docs.lando.dev/core/v3):

## Issues, Questions and Support

If you have a question or would like some community support we recommend you [join us on Slack](https://launchpass.com/devwithlando).

If you'd like to report a bug or submit a feature request then please [use the issue queue](https://github.com/lando/core/issues/new/choose) in this repo.

## Changelog

We try to log all changes big and small in both [THE CHANGELOG](https://github.com/lando/core/blob/main/CHANGELOG.md) and the [release notes](https://github.com/lando/core/releases).

## Contributors

<a href="https://github.com/lando/core/graphs/contributors">
<img src="https://contrib.rocks/image?repo=lando/cli" />
</a>

Made with [contributors-img](https://contrib.rocks).`

## Other Selected Resources

* [LICENSE](https://github.com/lando/core/blob/main/LICENSE.md)
* [The best professional advice ever](https://www.youtube.com/watch?v=tkBVDh7my9Q)
Thanks to the upstream [lando-core](https://github.com/lando/core)!
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@lando/core",
"description": "The libraries that power all of Lando.",
"version": "3.23.26",
"author": "Mike Pirog @pirog",
"name": "@florianpat/lando-core",
"description": "The libraries that power all of Lando. Fork by flo for compose integration",
"version": "3.23.27-4florianPat.0",
"author": "Florian Patruck @florianPat",
"license": "GPL-3.0",
"repository": "lando/core",
"bugs": "https://github.com/lando/core/issues/new/choose",
"homepage": "https://github.com/lando/core",
"repository": "florianPat/lando-core",
"bugs": "https://github.com/florianPat/lando-core/issues/new/choose",
"homepage": "https://github.com/florianPat/lando-core",
"keywords": [
"lando",
"lando-plugin"
Expand Down

0 comments on commit 11cc82a

Please sign in to comment.