-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (45 loc) · 1.65 KB
/
ci.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
name: Continuous integration
on:
push:
paths-ignore:
- '**.md'
jobs:
build:
name: Build and Test
uses: ./.github/workflows/build.yml
with:
createArtifact: ${{ startsWith(github.ref, 'refs/tags/') }}
release:
name: Create Release
needs: build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
env:
INSTALLER_DIR: installer
RELEASE_NOTES_FILENAME: ReleaseNotes.md
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: installer
path: ${{ env.INSTALLER_DIR }}
# Use markdown to create base release notes file with hashes of all
# downloadable files. This file will be used to create the GitHub
# release notes.
- name: Create release notes file
shell: pwsh
run: |
$destFile = Join-Path -Path "${{ env.INSTALLER_DIR }}" -ChildPath "${{ env.RELEASE_NOTES_FILENAME }}"
$checksums = Get-ChildItem -Path "${{ env.INSTALLER_DIR }}" -File
| Sort-Object -Property Name
| ForEach-Object { "| $($_.Name) | ``$((Get-FileHash $_.FullName -Algorithm SHA256).Hash)`` |" }
| Out-String
"| File | SHA256 |" | Out-File -FilePath $destFile
"| ---- | ------ |" | Out-File -FilePath $destFile -Append
$checksums | Out-File -FilePath $destFile -Append
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
files: ${{ env.INSTALLER_DIR }}/*.exe
name: TeamsStatusPub ${{ github.ref_name }}
body_path: ${{ env.INSTALLER_DIR }}/${{ env.RELEASE_NOTES_FILENAME }}