forked from gorilla-devs/GDLauncher
-
Notifications
You must be signed in to change notification settings - Fork 1
119 lines (111 loc) · 3.77 KB
/
nodejs.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: OxLAUNCHER CI
on:
push:
branches:
- master
- releases
- native-refactor
pull_request:
branches:
- master
- releases
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Use Node.js 16.17.0
uses: actions/setup-node@v1
with:
node-version: '16.17.0'
- name: Install Nightly
run: |
rustup toolchain install nightly
- name: Change Python version (MacOS)
if: matrix.os == 'macos-latest'
run: |
ln -s -f /usr/local/bin/python3.11 /usr/local/bin/python3
- name: Install rust (Windows)
if: matrix.os == 'windows-latest'
run: |
rustup target add x86_64-pc-windows-msvc --toolchain nightly
- name: Install rust (MacOS)
if: matrix.os == 'macos-latest'
run: |
rustup target add aarch64-apple-darwin --toolchain nightly
- name: Install rust (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
rustup target add x86_64-unknown-linux-gnu --toolchain nightly
- name: Switch rust to nightly
run: |
rustup default nightly
- name: npm run install
run: |
npm i --legacy-peer-deps
- name: npm i dmg-license (MacOS)
if: matrix.os == 'macos-latest'
run: |
npm i dmg-license --save-optional --legacy-peer-deps
- name: npm run release for windows
if: matrix.os == 'windows-latest' && github.event_name == 'push'
env:
CI: ''
TRAVIS_TAG: ''
APPVEYOR_REPO_TAG_NAME: ''
CIRCLE_TAG: ''
BITRISE_GIT_TAG: ''
GITHUB_ACTIONS: ''
CI_BUILD_TAG: ''
SENTRY_DSN: "${{ github.ref == 'refs/heads/releases' && secrets.SENTRY_DSN || '' }}"
SOURCE_MAPS_UPLOAD: "${{ github.ref == 'refs/heads/releases' && secrets.SENTRY_UPLOAD_SOURCE_MAPS_URL || '' }}"
SENTRY_AUTH: "${{ github.ref == 'refs/heads/releases' && secrets.SENTRY_AUTH || '' }}"
REACT_CF_API_KEY: "${{ secrets.CF_API_KEY }}"
run: |
npm run release
- name: npm run release for mac and linux
if: matrix.os != 'windows-latest' || github.event_name != 'push'
env:
CI: ''
TRAVIS_TAG: ''
APPVEYOR_REPO_TAG_NAME: ''
CIRCLE_TAG: ''
GITHUB_ACTIONS: ''
BITRISE_GIT_TAG: ''
CI_BUILD_TAG: ''
SENTRY_DSN: "${{ github.ref == 'refs/heads/releases' && secrets.SENTRY_DSN || '' }}"
SOURCE_MAPS_UPLOAD: "${{ github.ref == 'refs/heads/releases' && secrets.SENTRY_UPLOAD_SOURCE_MAPS_URL || '' }}"
SENTRY_AUTH: "${{ github.ref == 'refs/heads/releases' && secrets.SENTRY_AUTH || '' }}"
REACT_CF_API_KEY: "${{ secrets.CF_API_KEY }}"
run: |
npm run release
- name: upload release to gh releases
if: github.event_name == 'push' && github.ref == 'refs/heads/releases'
env:
GH_ACCESS_TOKEN_RELEASES: ${{ secrets.GH_ACCESS_TOKEN_RELEASES }}
run: |
npm run upload
- uses: actions/upload-artifact@v1
if: matrix.os == 'macos-latest'
with:
name: MacOs Release
path: deploy
- uses: actions/upload-artifact@v1
if: matrix.os == 'windows-latest'
with:
name: Windows Release
path: deploy
- uses: actions/upload-artifact@v1
if: matrix.os == 'ubuntu-latest'
with:
name: Linux Release
path: deploy