-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (61 loc) · 2.08 KB
/
release.yaml
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
name: Release
on:
push:
tags:
- 'v*'
- '!v*-rc*'
- '!v*-dev*'
jobs:
build:
# Prevent running this on forks
if: github.repository_owner == 'headwindsim'
name: Upload Release Asset
runs-on: ubuntu-latest
env:
ASSET_PATH: dist/Headwind_Installer_Setup.exe
ASSET_DIRECTORY: dist/
ASSET_NAME: Headwind_Installer_Setup.exe
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.9'
- name: Create .sentrydsn file
run: |
echo ${{ secrets.SENTRY_DSN_INSTALLER }} >> ./extraResources/.sentrydsn
- name: Install NPM dependencies
run: npm ci
- name: Install system requirements
run: |
sudo eatmydata apt-get install ppa-purge
sudo eatmydata ppa-purge -y ppa:ubuntu-toolchain-r/test
sudo dpkg --add-architecture i386
sudo apt update
sudo DEBIAN_FRONTEND=noninteractive eatmydata apt install -y --no-install-recommends wine-stable wine32 wine64
- name: Package installer
run: |
npm run package && rm -rf ./dist/win-unpacked/
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.ASSET_PATH }}
asset_name: ${{ env.ASSET_NAME }}
asset_content_type: application/x-msdos-program
- name: Upload to CloudFlare CDN
env:
CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }}
run: ./scripts/cdn-cf.sh installer/release ./dist && ./scripts/cdn-cf.sh installer/rc ./dist