v3.2.2: OneXPlayer Hotfix #29
Workflow file for this run
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: Publish as AppImage | |
permissions: | |
contents: write | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
build_plugin: | |
runs-on: ubuntu-latest | |
container: | |
image: archlinux:latest | |
steps: | |
- name: set git global safe directory | |
run: | | |
pacman -Syu git npm --noconfirm | |
git config --global --add safe.directory $(realpath .) | |
- uses: actions/checkout@v3 | |
- name: build AppImage | |
run: | | |
VERSION=$(cat package.json | grep -E '"version": "[0-9\.]+"' -o | grep -E "[0-9\.]+" -o) | |
sed -i "s|\"version\": \"1.0.0\"|\"version\": \"$VERSION\"|" "electron/package.json" | |
npm ci | |
npm run electron-build | |
cd electron | |
npm ci | |
npm run build | |
chmod +x dist/hhd-ui.AppImage | |
continue-on-error: true | |
- name: show files | |
run: | | |
ls ./electron/dist/hhd-ui.AppImage | |
- name: Publish Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: hhd-ui-electron | |
path: ./electron/dist/hhd-ui.AppImage | |
publish: | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
needs: build_plugin | |
steps: | |
- run: mkdir /tmp/artifacts | |
- name: download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
path: /tmp/artifacts | |
- run: ls -R /tmp/artifacts | |
- name: publish to github release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: /tmp/artifacts/hhd-ui-electron/hhd-ui.AppImage | |
tag_name: ${{ github.ref_name }} | |
body: | | |
hhd-ui | |
draft: true | |
prerelease: contains(github.ref, 'pre') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |