Posixpurger #41
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: Test Windoze Installer Build | |
on: | |
pull_request: | |
jobs: | |
test-windows-installer: | |
runs-on: ${{ matrix.os }} | |
env: | |
WINDOZE_CERT_DATA: ${{ secrets.WINDOZE_CERT_DATA }} | |
WINDOZE_CERT_PASSWORD: ${{ secrets.WINDOZE_CERT_PASSWORD }} | |
TERM: xterm | |
strategy: | |
matrix: | |
os: | |
- windows-2022 | |
node-version: | |
- '18' | |
arch: | |
- x64 | |
steps: | |
# Install deps and cache | |
# Eventually it would be great if these steps could live in a separate YAML file | |
# that could be included in line to avoid code duplication | |
- 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 | |
# Import ENVVARS from build.env | |
# @NOTE: We do this so there is a single place to update versions | |
- name: Import build version envvars | |
id: import-env | |
shell: bash | |
run: | | |
while read line; do | |
echo "$line" >> $GITHUB_ENV | |
done < BUILD.env | |
# Build and prep the release | |
- name: Prepare Release | |
uses: lando/prepare-release-action@v2 | |
with: | |
version: dev | |
sync: false | |
- name: Ensure version | |
run: node -pe 'JSON.parse(process.argv[1]).version' "$(cat package.json)" | |
shell: bash | |
- name: Import and verify certs | |
shell: powershell | |
run: scripts/import-win-certs.ps1 | |
- name: Assemble pieces | |
shell: powershell | |
run: scripts/assemble-win.ps1 | |
- name: Create and sign package | |
shell: powershell | |
run: scripts/create-exe.ps1 | |
# Create and upload releases | |
- name: Create releases | |
shell: bash | |
run: | | |
mkdir -p dist releases | |
cp -f "build/installer/dist/LandoInstaller.exe" "dist/LandoInstaller.exe" | |
cp -f "dist/LandoInstaller.exe" "releases/lando-build-test-${{ matrix.arch }}.exe" | |
ls -lsa releases | |
# Upload back to Actions | |
- name: Upload build snapshot as Actions artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: lando-build-${{ github.sha }}-${{ matrix.arch}}.exe | |
path: releases | |
if-no-files-found: error | |
retention-days: 30 | |
# Upload releases to S3 | |
- 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 releases to S3 | |
shell: bash | |
run: | | |
aws s3 sync releases s3://files.lando.dev/installer | |
# Below is for backwards compatibility | |
aws s3 sync releases s3://files.lando.dev |