-
Notifications
You must be signed in to change notification settings - Fork 0
145 lines (124 loc) · 4.16 KB
/
Create_Release.yml
File metadata and controls
145 lines (124 loc) · 4.16 KB
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Create Release
env:
project: PopCameraDevice
on:
push:
branches:
- master
- '*Test*'
tags:
- v*
watch:
types: [started]
jobs:
Build:
name: ${{ matrix.config.os }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- os: ubuntu-latest
type: linux
arch: x86_64
# disabled whilst not nvidia runner
#- os: Nvidia
# type: linux
# arch: arm64
# tsdk: not compiling for the pi
# - os: Pi4
# type: linux
# arch: arm64
- os: windows-latest
type: x64
- os: macos-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: recursive
- name: Configure Windows
if: matrix.config.os == 'windows-latest'
uses: microsoft/setup-msbuild@v1.0.2
- name: Windows
if: matrix.config.os == 'windows-latest'
uses: NewChromantics/PopAction_BuildWindows@v1
with:
BuildPlatform: x64
BuildConfiguration: Release
# would be nice to extract this from visual studio
BuildDirectory: Build\Release_x64
project: ${{ env.project }}
- name: "Import Apple-Distriubution NewChromantics Signing Certificate"
if: matrix.config.os == 'macos-latest'
uses: NewChromantics/import-signing-certificate@v1.0.2
with:
certificate-data: ${{ secrets.APPLE_DEV_NEWCHROMANTICS_P12 }}
certificate-passphrase: ${{ secrets.APPLE_DEV_NEWCHROMANTICS_PASSWORD }}
keychain-password: "Hello"
- name: Apple
id: Apple
if: matrix.config.os == 'macos-latest'
uses: NewChromantics/PopAction_BuildApple@v1.0.11
with:
BuildScheme: ${{ env.project }}_Universal
project: ${{ env.project }}
- name: Linux
if: matrix.config.type == 'linux'
uses: NewChromantics/PopAction_BuildLinux@v1
with:
os: ${{ matrix.config.os }}
project: ${{ env.project }}
arch: ${{ matrix.config.arch }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
# tsdk: these env vars are set in each of the actions
name: ${{ env.UPLOAD_NAME }}
path: ${{ env.UPLOAD_DIR }}
publish-gpr:
needs: Build
runs-on: ubuntu-latest
steps:
# Download artifacts into Packaging dir
- uses: actions/checkout@v2
- name: Download build artifacts
uses: actions/download-artifact@v4.1.7
with:
path: ${{ env.project }}.Package/
# copy files we want in the release/package into the package dir
- name: Copy files for packaging
run: |
echo Copying files into $PACKAGE_DIR
echo Project is ${{ env.project }}
echo Project2 is $project
cp Readme.md $PACKAGE_DIR
env:
PACKAGE_DIR: ${{ env.project }}.Package/
# setup node for npm packaging
- name: Make github package
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
# set dry-run if this isn't a tag so npm publish will run, but not do anything (and not fail)
- name: Set npm publish as dry-run
if: startsWith(github.ref, 'refs/tags/v') != true
run: echo "NPM_PACKAGE_DRY_RUN=--dry-run" >> $GITHUB_ENV
# copy files we want to
# download github-publish dependencies (ci), then publish from package dir
- name: Publish
working-directory: ${{ env.project }}.Package/
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
ls
npm publish $NPM_PACKAGE_DRY_RUN
# make a release
- name: Make github release
# only try and make a release if this is a release (to help testing npm packaging)
if: startsWith(github.ref, 'refs/tags/v')
uses: fnkr/github-action-ghr@v1
env:
GHR_COMPRESS: zip
GHR_PATH: ${{ env.project }}.Package/
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}