mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
64 lines
2.3 KiB
YAML
64 lines
2.3 KiB
YAML
name: Build
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
lint:
|
|
uses: ./.github/workflows/lint.yml
|
|
|
|
test:
|
|
uses: ./.github/workflows/test.yml
|
|
|
|
build:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Set up Python environment
|
|
uses: ./.github/actions/setup-liberation-python
|
|
|
|
- name: Set up JS environment
|
|
uses: ./.github/actions/setup-liberation-js
|
|
|
|
- name: Set build number
|
|
run: |
|
|
[IO.File]::WriteAllLines($pwd.path + "\resources\buildnumber", $env:GITHUB_RUN_NUMBER)
|
|
[IO.File]::WriteAllLines($pwd.path + "\resources\gitsha", $env:GITHUB_SHA)
|
|
|
|
- name: Build app
|
|
uses: ./.github/actions/build-app
|
|
|
|
- name: Create archive
|
|
run:
|
|
Compress-Archive -Path .\dist\dcs-retribution\ -DestinationPath
|
|
dist\dcs-retribution.zip
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: dcs-retribution
|
|
path: dist/dcs-retribution.zip
|
|
|
|
- name: Send status to Discord
|
|
uses: stegzilla/discord-notify@v2
|
|
with:
|
|
webhook_url: ${{ secrets.discord_webhook_betas }}
|
|
title: "Build #${{ github.run_number }} available!"
|
|
message: "**Branch:** ${{ github.ref_name }}\n**Download link:\n** https://github.com/dcs-retribution/dcs-retribution/actions/runs/${{ github.run_id }}"
|
|
include_image: true
|
|
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
|
|
username: GitHub Build Notifier
|
|
if: github.repository == 'dcs-retribution/dcs-retribution' && startsWith(github.ref_name, 'test')
|
|
|
|
- name: Send status to Discord
|
|
uses: stegzilla/discord-notify@v2
|
|
with:
|
|
webhook_url: ${{ secrets.discord_webhook_alphas }}
|
|
title: "Build #${{ github.run_number }} available!"
|
|
message: "**Branch:** ${{ github.ref_name }}\n**Download link:\n** https://github.com/dcs-retribution/dcs-retribution/actions/runs/${{ github.run_id }}"
|
|
include_image: true
|
|
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
|
|
username: GitHub Build Notifier
|
|
if: github.repository == 'dcs-retribution/dcs-retribution' && github.ref_name == 'dev'
|