aboutsummaryrefslogtreecommitdiff
path: root/cmd/ansible/release.yml
blob: 4cd005cd39bde74d4b87d59f425bee8198c7251a (plain) (blame)
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
---
- name: Release to github repo
  hosts: 127.0.0.1
  connection: local
  tasks:
    - include_vars: vars.yml

    # Create release.
    - github_release:
        token: "{{ github_release_token }}"
        user: jloup
        repo: dist
        action: create_release
        tag: "crypto-v{{ version }}"
        target: master
        name: Crypto Release
        body: "NOTE: this repo does not include any source code."

    # Build server app.
    - make:
        chdir: ../app
        target: release
    - shell:
        github-release upload                          \
        -s "{{ github_release_token }}"                \
        -u jloup                                       \
        -r dist                                        \
        -t crypto-v{{ version }}                       \
        -n "cryptoportfolio-linux-amd64"               \
        -l "cryptoportfolio binary (linux amd64)"      \
        -R                                             \
        -f ../app/dist/linux_amd64/cryptoportfolio-app
    - shell:
        github-release upload                        \
        -s "{{ github_release_token }}"              \
        -u jloup                                     \
        -r dist                                      \
        -t crypto-v{{ version }}                     \
        -n "cryptoportfolio-linux-386"               \
        -l "cryptoportfolio binary (linux 386)"      \
        -R                                           \
        -f ../app/dist/linux_386/cryptoportfolio-app

    # Build webapp.
    - make:
        chdir: ../web
        target: release
        params:
          ENV: prod
    - shell:
        github-release upload                       \
        -s "{{ github_release_token }}"             \
        -u jloup                                    \
        -r dist                                     \
        -t crypto-v{{ version }}                    \
        -n "webapp.tar.gz"                          \
        -R                                          \
        -f ../web/build/webapp.tar.gz