Skip to content

Commit

Permalink
Upload artifacts to draft when new tag (#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImUrX authored Feb 22, 2023
1 parent 9b774d7 commit f313e96
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 3 deletions.
109 changes: 106 additions & 3 deletions .github/workflows/gradle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
- name: Test with Gradle
run: ./gradlew test


build:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -66,9 +67,20 @@ jobs:
# A file, directory or wildcard pattern that describes what to upload
path: server/build/libs/*

bundle:
- name: Upload to draft release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
generate_release_notes: true
files: |
server/build/libs/*
bundle-linux:
runs-on: ubuntu-20.04
needs: build
needs: [build, test]
if: contains(fromJSON('["workflow_dispatch", "create"]'), github.event_name)
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -131,9 +143,27 @@ jobs:
name: SlimeVR-GUI-AppImage
path: target/release/bundle/appimage/slimevr*.AppImage

- name: Prepare for release
if: startsWith(github.ref, 'refs/tags/')
run: |
cp target/release/bundle/appimage/slimevr*.AppImage ./SlimeVR-amd64.appimage
cp target/release/bundle/deb/slimevr*.deb ./SlimeVR-amd64.deb
- name: Upload to draft release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
generate_release_notes: true
files: |
./SlimeVR-amd64.appimage
./SlimeVR-amd64.deb
bundle-mac:
runs-on: macos-latest
needs: build
needs: [build, test]
if: contains(fromJSON('["workflow_dispatch", "create"]'), github.event_name)
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -179,3 +209,76 @@ jobs:
with:
name: SlimeVR-GUI-MacDmg
path: target/release/bundle/dmg/slimevr.dmg

- name: Prepare for release
if: startsWith(github.ref, 'refs/tags/')
run: |
cp target/release/bundle/dmg/slimevr.dmg ./SlimeVR-mac.dmg
- name: Upload to draft release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
generate_release_notes: true
files: |
./SlimeVR-mac.dmg
bundle-windows:
runs-on: windows-latest
needs: [build, test]
if: contains(fromJSON('["workflow_dispatch", "create"]'), github.event_name)
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: actions/download-artifact@v3
with:
name: "SlimeVR-Server"
path: server/build/libs/

- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2
with:
shared-key: "windows-latest"

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'npm'

- name: Build
run: |
npm ci
npm run skipbundler
- name: Bundle to zips
shell: bash
run: |
mkdir SlimeVR
cp gui/src-tauri/icons/icon.ico ./SlimeVR/run.ico
cp server/build/libs/slimevr.jar ./SlimeVR/slimevr.jar
cp server/resources/* ./SlimeVR/
cp target/release/slimevr.exe ./SlimeVR/
7z a -tzip SlimeVR-win64.zip ./SlimeVR/
mv ./SlimeVR/slimevr.exe ./SlimeVR/slimevr-ui.exe
7z a -tzip SlimeVR.zip ./SlimeVR/
- uses: actions/[email protected]
with:
name: SlimeVR-GUI-Windows
path: ./SlimeVR*.zip

- name: Upload to draft release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
generate_release_notes: true
files: |
./SlimeVR-win64.zip
./SlimeVR.zip
2 changes: 2 additions & 0 deletions dev.slimevr.SlimeVR.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
</screenshot>
</screenshots>
<releases>
<release version="0.6.2" date="2023-02-17"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.6.2</url></release>
<release version="0.6.1" date="2023-02-12"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.6.1</url></release>
<release version="0.6.0" date="2023-01-05"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.6.0</url></release>
<release version="0.5.1" date="2022-12-12"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.5.1</url></release>
<release version="0.5.0" date="2022-12-07"><url>https://github.com/SlimeVR/SlimeVR-Server/releases/tag/v0.5.0</url></release>
Expand Down

0 comments on commit f313e96

Please sign in to comment.