chore: remove install script from azure-local-cli #29
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: Deploy CLI | |
on: | |
push: | |
branches: | |
- main | |
# on: | |
# push: | |
# tags: | |
# - v* | |
jobs: | |
docker: | |
name: Build & Publish Docker Image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build:docker | |
- name: Build image | |
run: docker build -t localsandbox . | |
bundle-cli: | |
name: Build & Bundle CLI | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
osname: linux | |
arch: x64 | |
- os: windows-latest | |
osname: win | |
arch: x64 | |
- os: macos-latest | |
osname: macos | |
arch: arm64 | |
- os: macos-13 | |
osname: macos | |
arch: x64 | |
runs-on: ${{ matrix.os }} | |
env: | |
BUNDLE_FILENAME: localsandbox-${{ matrix.osname }}-${{ matrix.arch }}.tar.gz | |
PKG_TARGET: ${{ matrix.osname }}-${{ matrix.arch }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up python | |
id: setup-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
# - name: Install Poetry | |
# uses: snok/install-poetry@v1 | |
# - name: Add Poetry to PATH on windows-latest | |
# if: matrix.osname == 'win' | |
# shell: bash | |
# run: | | |
# echo "C:\Users\runneradmin\.local\bin" >> $GITHUB_PATH | |
# - name: Check Poetry | |
# run: poetry --version | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23' | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: npm ci | |
- name: Bundle CLI | |
run: npm run bundle:cli | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: localsandbox-${{ matrix.osname }}-${{ matrix.arch }} | |
path: ${{ env.BUNDLE_FILENAME }} | |
smoke-test-cli: | |
name: Smoke Test CLI | |
needs: bundle-cli | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
osname: linux | |
arch: x64 | |
- os: windows-latest | |
osname: win | |
arch: x64 | |
- os: macos-latest | |
osname: macos | |
arch: arm64 | |
- os: macos-13 | |
osname: macos | |
arch: x64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: localsandbox-${{ matrix.osname }}-${{ matrix.arch }} | |
path: ./ | |
- name: Extract artifact | |
run: tar -xzf localsandbox-${{ matrix.osname }}-${{ matrix.arch }}.tar.gz | |
# - name: List files | |
# run: ls -la | |
# - name: Set execute permission on Windows | |
# if: matrix.os == 'windows-latest' | |
# run: | | |
# icacls localsandbox.exe /grant Everyone:F | |
- name: Smoke test localsandbox | |
run: ./localsandbox${{ (matrix.osname == 'win' && '.exe') || '' }} --version | |
- uses: pietrobolcato/install-azure-cli-action@main | |
- name: Test az cli | |
run: az --version | |
- name: Smoke test azl | |
run: ./azl${{ (matrix.osname == 'win' && '.exe') || '' }} --version | |
create-release: | |
needs: [bundle-cli, smoke-test-cli] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# - name: Create a Release | |
# uses: elgohr/Github-Release-Action@v5 | |
# env: | |
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# title: MyReleaseMessage | |
# tag: MyTag | |
# - name: Create GitHub Release | |
# id: create_release | |
# uses: actions/create-release@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# tag_name: ${{ env.VERSION }} | |
# release_name: Release ${{ env.VERSION }} | |
# draft: false | |
# prerelease: false | |
# body_path: changelog.md | |
# - name: Upload Release Assets | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ steps.create_release.outputs.upload_url }} | |
# asset_path: ./localsandbox-${{ matrix.os }}-${{ matrix.arch }}.tar.gz | |
# asset_name: localsandbox-${{ matrix.os }}-${{ matrix.arch }}.tar.gz | |
# asset_content_type: application/gzip |