-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (84 loc) · 2.96 KB
/
build_release_latest.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
name: build-release-latest
on:
push:
tags-ignore: 'v*'
branches: '**'
# Enables the possibility to trigger the workflow manually
workflow_dispatch:
jobs:
test_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setting up required powershell modules
- name: Set required PowerShell modules
id: psmodulecache
uses: potatoqualitee/[email protected]
with:
modules-to-cache: Pester, PSScriptAnalyzer, InvokeBuild
shell: pwsh
# Setting up the powershell module cache
- name: Setup PowerShell module cache
id: cacher
uses: actions/cache@v2
with:
path: ${{ steps.psmodulecache.outputs.modulepath }}
key: ${{ steps.psmodulecache.outputs.keygen }}
# Installing the required powershell module, if not cached
- name: Install required PowerShell modules
if: steps.cacher.outputs.cache-hit != 'true'
uses: potatoqualitee/[email protected]
with:
shell: pwsh
- name: Invoke PSScriptAnalyzer & Pester Tests
shell: pwsh
run: pwsh -command "Invoke-Build -File ./.build.ps1 -Configuration 'Test' -ciMode"
build_release:
runs-on: windows-latest
needs: test_release
steps:
- uses: actions/checkout@v2
# Setting up required powershell modules
- name: Set required PowerShell modules
id: psmodulecachebuild
uses: potatoqualitee/[email protected]
with:
modules-to-cache: InvokeBuild, Ps2exe
shell: powershell
# Setting up the powershell module cache
- name: Setup PowerShell module cache
id: cacher
uses: actions/cache@v2
with:
path: ${{ steps.psmodulecachebuild.outputs.modulepath }}
key: ${{ steps.psmodulecachebuild.outputs.keygen }}
# Installing the required powershell module, if not cached
- name: Install required PowerShell modules
if: steps.cacher.outputs.cache-hit != 'true'
uses: potatoqualitee/[email protected]
with:
shell: powershell
- name: Building Application
shell: powershell
run: powershell -command "Invoke-Build -File ./.build.ps1 -Configuration 'Release' -ciMode"
- uses: actions/upload-artifact@v2
with:
path: |
build/dist/*.zip
retention-days: 1
if-no-files-found: error
github-release:
runs-on: ubuntu-latest
needs: [ build_release ]
steps:
- uses: actions/download-artifact@v2
- run: cd artifact && md5sum *wsl-vpnkit-tray* > md5sums.txt
- run: cd artifact && sha256sum *wsl-vpnkit-tray* > sha256sums.txt
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
body_path: CHANGELOG.md
files: |
artifact/*