-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create slim-version releases and install plugins on non-slim release. * Make plugin install executable. * Nice format for plugin install script. * Better plugin install script.
- Loading branch information
1 parent
639c80c
commit 61883e5
Showing
7 changed files
with
528 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,146 @@ | ||
name: Create Slim Dev Releases | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- 'preview/**' | ||
|
||
jobs: | ||
package: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
TERM: xterm | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
arch: | ||
- x64 | ||
- arm64 | ||
node-version: | ||
- '18' | ||
os: | ||
- linux | ||
- macos | ||
- win | ||
pkg: | ||
- "@yao-pkg/[email protected]" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install node ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: npm | ||
- name: Install dependencies | ||
run: npm clean-install --prefer-offline --frozen-lockfile --production | ||
- name: Prepare Release | ||
uses: lando/prepare-release-action@v3 | ||
with: | ||
version: dev | ||
sync: false | ||
- name: Ensure version | ||
run: node ./bin/lando version | ||
- name: Package into node binary | ||
uses: lando/pkg-action@v4 | ||
with: | ||
entrypoint: bin/lando.js | ||
arch: ${{ matrix.arch }} | ||
node-version: ${{ matrix.node-version }} | ||
os: ${{ matrix.os }} | ||
pkg: ${{ matrix.pkg }} | ||
|
||
sign-n-deploy: | ||
runs-on: ${{ matrix.os }} | ||
needs: | ||
- package | ||
env: | ||
TERM: xterm | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: windows-2022 | ||
key: cli-node18-win-x64-${{ github.sha }} | ||
file: lando/cli.exe | ||
certificate-data: WINDOZE_CERT_DATA | ||
certificate-password: WINDOZE_CERT_PASSWORD | ||
result: lando-win-x64-${{ github.ref_name }}-slim.exe | ||
- os: windows-2022 | ||
key: cli-node18-win-arm64-${{ github.sha }} | ||
file: lando/cli.exe | ||
certificate-data: WINDOZE_CERT_DATA | ||
certificate-password: WINDOZE_CERT_PASSWORD | ||
result: lando-win-arm64-${{ github.ref_name }}-slim.exe | ||
- os: macos-12 | ||
key: cli-node18-macos-x64-${{ github.sha }} | ||
file: lando/cli | ||
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-12 | ||
key: cli-node18-macos-arm64-${{ github.sha }} | ||
file: lando/cli | ||
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-22.04 | ||
key: cli-node18-linux-x64-${{ github.sha }} | ||
file: lando/cli | ||
result: lando-linux-x64-${{ github.ref_name }}-slim | ||
- os: ubuntu-22.04 | ||
key: cli-node18-linux-arm64-${{ github.sha }} | ||
file: lando/cli | ||
result: lando-linux-arm64-${{ github.ref_name }}-slim | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- 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 }} | ||
options: ${{ matrix.options }} | ||
- name: Rename as needed | ||
shell: bash | ||
run: | | ||
mkdir -p releases | ||
cp ${{ steps.code-sign-action.outputs.file }} releases/${{ matrix.result }} | ||
cp releases/${{ matrix.result }} "releases/$(echo ${{ matrix.result }} | sed 's/${{ github.ref_name }}/latest/;')" | ||
cp releases/${{ matrix.result }} "releases/$(echo ${{ matrix.result }} | sed 's/${{ github.ref_name }}/dev/;')" | ||
chmod +x releases/* | ||
ls -lsa releases | ||
- name: Configure S3 Credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
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 dev releases to S3 | ||
shell: bash | ||
run: aws s3 sync releases s3://files.lando.dev/cli | ||
|
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
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 |
---|---|---|
@@ -0,0 +1,138 @@ | ||
name: PR Slim Release Tests | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
package: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
TERM: xterm | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
arch: | ||
- x64 | ||
- arm64 | ||
node-version: | ||
- '18' | ||
os: | ||
- linux | ||
- macos | ||
- win | ||
pkg: | ||
- "@yao-pkg/[email protected]" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install node ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: npm | ||
- name: Install dependencies | ||
run: npm clean-install --prefer-offline --frozen-lockfile --production | ||
- name: Prepare Release | ||
uses: lando/prepare-release-action@v3 | ||
with: | ||
version: dev | ||
sync: false | ||
- name: Ensure version | ||
run: node ./bin/lando version | ||
- name: Package into node binary | ||
uses: lando/pkg-action@v4 | ||
id: pkg-action | ||
with: | ||
entrypoint: bin/lando.js | ||
arch: ${{ matrix.arch }} | ||
node-version: ${{ matrix.node-version }} | ||
os: ${{ matrix.os }} | ||
pkg: ${{ matrix.pkg }} | ||
|
||
sign-n-deploy: | ||
runs-on: ${{ matrix.os }} | ||
needs: | ||
- package | ||
env: | ||
TERM: xterm | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: windows-2022 | ||
key: cli-node18-win-x64-${{ github.sha }} | ||
file: lando/cli.exe | ||
certificate-data: WINDOZE_CERT_DATA | ||
certificate-password: WINDOZE_CERT_PASSWORD | ||
result: lando-win-x64-snapshot-${{ github.sha }}-slim.exe | ||
- os: windows-2022 | ||
key: cli-node18-win-arm64-${{ github.sha }} | ||
file: lando/cli.exe | ||
certificate-data: WINDOZE_CERT_DATA | ||
certificate-password: WINDOZE_CERT_PASSWORD | ||
result: lando-win-arm64-snapshot-${{ github.sha }}-slim.exe | ||
- os: macos-12 | ||
key: cli-node18-macos-x64-${{ github.sha }} | ||
file: lando/cli | ||
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-snapshot-${{ github.sha }}-slim | ||
- os: macos-12 | ||
key: cli-node18-macos-arm64-${{ github.sha }} | ||
file: lando/cli | ||
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-snapshot-${{ github.sha }}-slim | ||
- os: ubuntu-20.04 | ||
key: cli-node18-linux-x64-${{ github.sha }} | ||
file: lando/cli | ||
result: lando-linux-x64-snapshot-${{ github.sha }}-slim | ||
- os: ubuntu-20.04 | ||
key: cli-node18-linux-arm64-${{ github.sha }} | ||
file: lando/cli | ||
result: lando-linux-arm64-snapshot-${{ github.sha }}-slim | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- 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 }} | ||
options: ${{ matrix.options }} | ||
- name: Rename as needed | ||
shell: bash | ||
run: | | ||
chmod +x ${{ steps.code-sign-action.outputs.file }} | ||
mv ${{ steps.code-sign-action.outputs.file }} ${{ matrix.result }} | ||
- name: Upload snapshot release ${{ matrix.result }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.result }} | ||
path: ${{ matrix.result }} | ||
if-no-files-found: error | ||
retention-days: 1 |
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
Oops, something went wrong.