Skip to content

Create Releases

Create Releases #115

Workflow file for this run

name: Create Releases
on:
release:
types:
- 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 == false && 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
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-*
flatten: true
show: true
upload-name: release-checksums-${{ github.sha }}
# - 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
# 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