Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
karin0 committed Oct 27, 2023
1 parent 0fae69a commit 8b05165
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
name: Build
on: [push, workflow_dispatch]

on:
release:
types: [published] # include pre-releases
push:
branches: # ignore any tags
- '**'
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -91,9 +98,33 @@ jobs:
FILE=pvg-${GITHUB_SHA::7}-$target.xz
echo "FILE=$FILE" >> $GITHUB_ENV
echo "BIN_FILE=$bin" >> $GITHUB_ENV
xz -cv $bin > $FILE
- uses: actions/upload-artifact@v3
with:
name: ${{ env.FILE }}
path: ${{ env.FILE }}

- uses: robinraju/[email protected]
if: ${{ github.event_name == 'release' }}
with:
repository: karin0/pvg-app
latest: true
fileName: "pvg-app-*.zip"
out-file-path: static
extract: true

- name: Package for Release
if: ${{ github.event_name == 'release' }}
run: |
ZIP_FILE=pvg-${GITHUB_REF##*/}-${{ matrix.target }}.zip
mv "$BIN_FILE" .
zip -r "$ZIP_FILE" static "$(basename "$BIN_FILE")"
echo "ZIP_FILE=$ZIP_FILE" >> $GITHUB_ENV
- uses: shogo82148/actions-upload-release-asset@v1
if: ${{ github.event_name == 'release' }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.ZIP_FILE }}

0 comments on commit 8b05165

Please sign in to comment.