-
-
Notifications
You must be signed in to change notification settings - Fork 247
67 lines (55 loc) · 2.23 KB
/
qa.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
name: FModel QA Builder
on:
push:
branches: [ dev ]
jobs:
build:
runs-on: windows-latest
steps:
- name: GIT Checkout
uses: actions/checkout@v2
with:
submodules: 'true'
- name: Fetch Submodules Recursively
run: git submodule update --init --recursive
- name: .NET 8 Setup
uses: actions/setup-dotnet@v2
with:
dotnet-version: '8.0.x'
- name: .NET Restore
run: dotnet restore FModel
- name: Get Version
id: package_version
uses: KageKirin/[email protected]
with:
file: FModel/FModel.csproj
regex: '^(?<major>[0-9])\.(?<minor>[0-9])\.(?<buildmetadata>[0-9])\.(?<patch>[0-9])$'
- name: .NET Publish
run: dotnet publish FModel -c Release --no-self-contained -r win-x64 -f net8.0-windows -o "./FModel/bin/Publish/" -p:PublishReadyToRun=false -p:PublishSingleFile=true -p:DebugType=None -p:GenerateDocumentationFile=false -p:DebugSymbols=false
- name: ZIP File
uses: papeloto/action-zip@v1
with:
files: ./FModel/bin/Publish/FModel.exe
dest: ${{ github.sha }}.zip # will end up in working directory not the Publish folder
- name: Edit QA Artifact
id: edited_release
uses: johnwbyrd/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
release: FModel QA Testing
tag: qa
prerelease: true
files: ${{ github.sha }}.zip
- name: FModel Auth
id: fmodel_auth
uses: fjogeleit/[email protected]
with:
url: "https://api.fmodel.app/v1/oauth/token"
data: '{"username": "${{ secrets.API_USERNAME }}", "password": "${{ secrets.API_PASSWORD }}"}'
- name: FModel Deploy Build
uses: fjogeleit/[email protected]
with:
url: "https://api.fmodel.app/v1/infos/${{ secrets.QA_ID }}"
method: "PATCH"
bearerToken: ${{ fromJson(steps.fmodel_auth.outputs.response).accessToken }}
data: '{"version": "${{ steps.package_version.outputs.version }}-dev+${{ github.sha }}", "downloadUrl": "https://github.com/4sval/FModel/releases/download/qa/${{ github.sha }}.zip"}'