-
Notifications
You must be signed in to change notification settings - Fork 96
67 lines (58 loc) · 1.8 KB
/
publish-next-binaries.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
name: Publish Nightly Next Binaries
on:
schedule:
- cron: '10 3 * * *'
workflow_dispatch:
inputs:
name:
description: 'Name of the output file'
required: false
default: ''
permissions:
contents: read
# This workflow is mostly a copy of publish binaries
# This is by choice as the next branch will eventually be merged in the master
# It makes it easy to remove when the time comes
jobs:
release_next_bin:
name: Build and Publish Next Binaries
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@master
with:
ref: next
- uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Configure SSH Key
uses: botpress/gh-actions/set_ssh_key@v1
with:
ssh_key: ${{ secrets.BP_PRO_SSH }}
- name: Install python3
uses: actions/setup-python@v1
with:
python-version: '3.x'
architecture: 'x64'
- name: Install Tools
run: pip install awscli
- name: Build Project
run: |
yarn
yarn build --prod
env:
EDITION: pro
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Archives
run: yarn cmd archive
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Publish
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 sync packages/bp/archives s3://botpress-next-bins/${{ github.event.inputs.name || format('nightly-{0}', steps.date.outputs.date) }}
aws s3 sync packages/bp/archives s3://botpress-next-bins/latest