Skip to content

Commit

Permalink
lock
Browse files Browse the repository at this point in the history
  • Loading branch information
ljmerza committed Dec 8, 2023
1 parent ba53165 commit 4422925
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ jobs:
- name: Run build
run: npm run build

- name: Archive production artifacts
run: zip -r dist.zip dist

- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: dist
path: dist.zip
- name: List files in dist
id: list_files
run: |
files=""
for file in dist/*; do
[[ -f $file ]] || continue
files="$files $file"
done
echo "::set-output name=files::$files"
- name: Determine TAG_NAME
run: |
Expand All @@ -61,11 +62,15 @@ jobs:
prerelease: false

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
run: |
for file in ${{ steps.list_files.outputs.files }}
do
curl \
-X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: $(file -b --mime-type $file)" \
--data-binary @$file \
"${{ steps.create_release.outputs.upload_url }}?name=$(basename $file)"
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist.zip
asset_name: dist.zip
asset_content_type: application/zip

0 comments on commit 4422925

Please sign in to comment.