-
Notifications
You must be signed in to change notification settings - Fork 77
40 lines (37 loc) · 1.13 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
on:
push:
pull_request:
release:
types: [published]
name: ci
jobs:
appimage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
set-safe-directory: '*'
- run: docker run --rm -v "$PWD:/github/workspace" -w "/github/workspace" rust:1.75.0-buster bash appimage.sh
- uses: actions/upload-artifact@v2
with:
if-no-files-found: error
name: popsicle-appimage-${{ github.sha }}
path: Popsicle_USB_Flasher-*.AppImage*
upload-to-release:
if: github.event_name == 'release'
runs-on: ubuntu-latest
needs: appimage
steps:
- uses: actions/download-artifact@v2
with:
name: popsicle-appimage-${{ github.sha }}
- run: printf 'APPIMAGE_FILENAME=%s\n' Popsicle_USB_Flasher-*.AppImage > $GITHUB_ENV
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.APPIMAGE_FILENAME }}
asset_name: ${{ env.APPIMAGE_FILENAME }}
asset_content_type: application/vnd.appimage