-
Notifications
You must be signed in to change notification settings - Fork 2
111 lines (103 loc) · 3.18 KB
/
build.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: BeatVortex CI Build
on:
push:
branches: [ master ]
paths-ignore:
- "docs/**"
- ".github/workflows/docs.yml"
tags:
- 'v*.*.*'
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v1
with:
node-version: 14.x
- run: npm ci
- run: npm run build --if-present
- uses: actions/upload-artifact@v1
with:
name: game-beatsaber
path: dist/
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: build
steps:
- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Download build artifact
uses: actions/download-artifact@v1
with:
name: game-beatsaber
path: extension
- name: Create Zip File
uses: thedoctor0/zip-release@76b1a767e74de8576f94ef5dbf69c47ee355f8b1
with:
filename: './game-beatsaber.zip'
path: '.'
directory: './extension'
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body: |
Download and install using the Extensions pane in Vortex.
To manually install, extract the zip to %APPDATA%\Vortex\plugins\game-beatsaber.
Read about the changes in this release at [beatvortex.dev/updates/${{ steps.vars.outputs.tag }}](https://beatvortex.dev/updates/${{ steps.vars.outputs.tag }}).
files: |
./extension/game-beatsaber.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
nexus:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@master
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Restore Tools
shell: bash
run: |
dotnet tool install -g NexusUploader
- name: Download build artifact
uses: actions/download-artifact@v1
with:
name: game-beatsaber
path: extension
- name: Create Zip File
uses: thedoctor0/zip-release@master
with:
filename: './game-beatsaber.zip'
path: '.'
directory: './extension'
- name: Set version output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/v}
- name: Validate unex config
continue-on-error: true
shell: bash
run: |
unex check -c
env:
UNEX_APIKEY: ${{ secrets.NEXUS_TOKEN }}
UNEX_COOKIES: ${{ secrets.NEXUS_COOKIES }}
UNEX_DEBUG: true
- name: Run Nexus uploader
shell: bash
run: |
unex upload 96 ./extension/game-beatsaber.zip -v ${{ steps.vars.outputs.tag }}
env:
UNEX_APIKEY: ${{ secrets.NEXUS_TOKEN }}
UNEX_COOKIES: ${{ secrets.NEXUS_COOKIES }}
UNEX_DEBUG: true