forked from Vocaluxe/Vocaluxe
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (73 loc) · 2.14 KB
/
build-nightly.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
name: Nightly build
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
jobs:
prepare-build:
name: Prepare build
runs-on: ubuntu-latest
outputs:
version: ${{ steps.previous-tag.outputs.tag }}-g${{ steps.shorten-sha.outputs.sha }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
README.md
- name: Get previous tag
id: previous-tag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 0.0.0
- name: Shorten sha
id: shorten-sha
run: |
sha=$(echo ${{ github.sha }} | cut -c 1-7) >> $GITHUB_OUTPUT
build-windows:
name: Build Windows
needs: prepare-build
uses: ./.github/workflows/dotnet-desktop.yml
with:
version: ${{ needs.prepare-build.outputs }}-g${{ github.sha }}
publish:
runs-on: ubuntu-latest
needs: build-windows
name: Publish release
steps:
- name: Create Release
if: ${{ github.event_name == 'push'}}
uses: ncipollo/release-action@v1.14.0
with:
name: Latest Nightly build
tag: Nightly
prerelease: true
allowUpdates: true
artifacts: Vocaluxe_Nightly_x64
attach-artifacts:
name: Attach artifacts
needs: [build-windows, publish]
strategy:
matrix:
build:
- label: "Windows_x86"
artifact-name: ${{needs.build-windows.outputs.x86}}
- label: "Windows_x64"
artifact-name: ${{needs.build-windows.outputs.x64}}
runs-on: ubuntu-latest
steps:
- name: Download artifact
id: download-artifact
uses: actions/download-artifact@v4
with:
name: ${{ matrix.build.artifact-name }}
- name: Zip files
run: |
cd ${{ steps.download-artifact.outputs.download-path }}
7z a '../${{ matrix.build.artifact-name }}.zip'
- name: Attach to release
uses: softprops/action-gh-release@v2
with:
files: ${{ steps.download-artifact.outputs.download-path }}/../${{ matrix.build.artifact-name }}.zip
tag_name: Nightly