Skip to content

Bump braces from 3.0.2 to 3.0.3 (#4) #28

Bump braces from 3.0.2 to 3.0.3 (#4)

Bump braces from 3.0.2 to 3.0.3 (#4) #28

Workflow file for this run

name: Compress
env:
NODE_VERSION: 18
on:
push:
branches:
- master
jobs:
compress:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup node.js v${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Compress dist directory
id: archive-dist
uses: ./
with:
path: 'dist/**'
format: tar
output: dist.tar
- name: Compress src directory
id: archive-src
uses: ./
with:
path: 'src/**'
format: tar
output: src.tar.gz
gzip: true
- name: Verify compressed files
run: |
declare -a arr=(
${{ steps.archive-dist.outputs.archive }}
${{ steps.archive-src.outputs.archive }}
)
for i in "${arr[@]}"
do
echo "Looking for file: $i"
if [ ! -f $i ]; then
echo "File '$i' does not exist."
exit 1
else
echo "File exists: $i"
fi
done
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: build
retention-days: 2
path: |
dist.tar
src.tar.gz