Skip to content

test 3.4 upload

test 3.4 upload #2265

Workflow file for this run

name: Build upload
on:
push:
branches:
- main
- "3.*"
- "test-34-upload"
jobs:
upload-build:
if: github.repository_owner == 'canonical'
name: Upload build artifacts
runs-on: ubuntu-22.04
env:
PACKAGE_NAME: maas-ui-${{ github.sha }}.tar.gz
REACT_APP_GIT_SHA: ${{ github.sha }}
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Get branch name
uses: nelonoel/branch-name@v1.0.1
- name: Restore node_modules
id: yarn-cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: CYPRESS_INSTALL_BINARY=0 yarn install
- name: Build
run: REACT_APP_GIT_SHA=${{env.REACT_APP_GIT_SHA}} yarn build
env:
CI: false
- name: Compress
run: cd build && tar -czf ../${{env.PACKAGE_NAME}} ./ && ls -hs ../${{env.PACKAGE_NAME}}
- name: Install upload-assets snap
run: sudo snap install upload-assets