-
Notifications
You must be signed in to change notification settings - Fork 7
66 lines (62 loc) · 1.95 KB
/
release.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
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write # Needed to write to GitHub draft release
env:
RPC_VERSION: ${{ github.ref_name }}
jobs:
build:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Build
run: |
cargo build --release --verbose
- name: Upload RPC build as artifact
uses: actions/upload-artifact@v4
with:
name: northstar-discord-rpc
path: |
target/release/*.dll
- name: Upload debug build artifact
uses: actions/upload-artifact@v4
with:
name: discord-rpc-debug-files
path: |
target/release/*.pdb
upload-rpc-to-release:
if: startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-22.04
steps:
- name: Download compiled RPC
uses: actions/download-artifact@v4
with:
name: northstar-discord-rpc
path: northstar-discord-rpc
- name: Download debug files
uses: actions/download-artifact@v4
with:
name: discord-rpc-debug-files
path: discord-rpc-debug-files
- name: Create zip to upload
run: |
ls -alh
ls -alh northstar-discord-rpc/
ls -alh discord-rpc-debug-files/
zip --recurse-paths --junk-paths northstar-discord-rpc.zip northstar-discord-rpc/*
zip --recurse-paths --junk-paths discord-rpc-debug-files.zip discord-rpc-debug-files/*
- name: Upload files to release
uses: softprops/action-gh-release@v1
with:
body: ":warning: These are development files! If you want to download Northstar, [go here instead](https://github.com/R2Northstar/Northstar/releases) :warning:"
draft: false
files: |
northstar-discord-rpc.zip
discord-rpc-debug-files.zip