-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 2.05 KB
/
main.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
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4.1.6
- name: Build
run: ./build.ps1
- name: Generate build infos
run: |
"URL: ${{ github.server_url }}/${{ github.repository }}" | Out-File INFOS.txt
"Commit URL: ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}" | Out-File -Append INFOS.txt
"Triggered by: ${{ github.actor }}" | Out-File -Append INFOS.txt
"Date: $(Get-Date) (US-format, UTC)" | Out-File -Append INFOS.txt
"Commit SHA: ${{ github.sha }}" | Out-File -Append INFOS.txt
"Branch/Tag: ${{ github.ref_name }}" | Out-File -Append INFOS.txt
# BRANCH TRIGGERED ONLY
# Nightly binaries on push/pull requests
- name: Upload binaries as zip artifact
uses: actions/upload-artifact@v4.3.3
if: ${{ github.ref_type == 'branch' }}
with:
name: Binaries @ ${{ github.sha }}
path: |
README.md
dist/
INFOS.txt
if-no-files-found: error
# TAG TRIGGERED ONLY
- uses: actions/setup-node@v4.0.2
if: ${{ github.ref_type == 'tag' }}
with:
node-version: 20.14.0
- name: Render README to PDF
if: ${{ github.ref_type == 'tag' }}
run: |
npm install markdown-pdf@11.0.0
npx markdown-pdf --out README.pdf README.md
- name: Zip it for release
if: ${{ github.ref_type == 'tag' }}
run: |
Compress-Archive -Path "dist/", "INFOS.txt", "README.pdf" -DestinationPath "./old-games-steam-launcher_${{ github.sha }}.zip"
# Release on version tag
- name: Create release on tag
uses: softprops/action-gh-release@v2.0.5
if: ${{ github.ref_type == 'tag' }}
with:
name: ${{ github.ref_name }} @ Old Games Steam Launchers
fail_on_unmatched_files: true
generate_release_notes: true
files: "old-games-steam-launcher_${{ github.sha }}.zip"