Bump @babel/traverse from 7.22.6 to 7.23.2 (#3) #27
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: 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 |