-
Notifications
You must be signed in to change notification settings - Fork 102
79 lines (67 loc) · 2.38 KB
/
nightly.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
on:
push:
branches:
- 'release/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: get-npm-version
id: package-version
uses: martinbeentjes/[email protected]
with:
path: packages/yoroi-extension
- name: Check if version has been updated
id: check
uses: EndBug/version-check@v2
with:
diff-search: true
file-name: ./packages/yoroi-extension/package.json
- name: Read .nvmrc
if: steps.check.outputs.changed == 'true'
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup node
if: steps.check.outputs.changed == 'true'
uses: actions/setup-node@v1
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
- name: npm install
if: steps.check.outputs.changed == 'true'
run: |
npm i --legacy-peer-deps
npm i --legacy-peer-deps --prefix packages/yoroi-extension
- name: Build
if: steps.check.outputs.changed == 'true'
run: |
cd packages/yoroi-extension
npm run prod:nightly
- name: Install Octopus CLI
if: steps.check.outputs.changed == 'true'
uses: OctopusDeploy/[email protected]
with:
version: latest
- name: Move package file
if: steps.check.outputs.changed == 'true'
run: mv "packages/yoroi-extension/Yoroi Nightly.zip" yoroi-frontend.${{ steps.check.outputs.version }}.zip
- name: Push package to Octopus Deploy
if: steps.check.outputs.changed == 'true'
uses: OctopusDeploy/[email protected]
with:
packages: 'yoroi-frontend.${{ steps.check.outputs.version }}.zip'
server: https://emurgo.octopus.app
api_key: ${{ secrets.OCTOPUS_API_KEY }}
- name: Create release
if: steps.check.outputs.changed == 'true'
uses: OctopusDeploy/[email protected]
with:
server: https://emurgo.octopus.app
api_key: ${{ secrets.OCTOPUS_API_KEY }}
project: 'yoroi-frontend'
channel: 'Nightly'
packages: 'yoroi-frontend:${{ steps.check.outputs.version }}'
release_number: '${{ steps.check.outputs.version }}'