forked from hyperledger-archives/grid
-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (104 loc) · 2.9 KB
/
publish-release.yaml
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
name: Publish Release
on:
push:
tags:
- '*'
env:
slack-channel: 'alerts'
jobs:
unit_test_grid:
if: >-
github.repository_owner == 'hyperledger'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Display envvars
run: env
- name: Install Just
run: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | sudo bash -s -- --to /usr/local/bin
- name: Run tests
run: just ci-test
publish_docker:
needs: unit_test_grid
if: >-
github.repository_owner == 'hyperledger'
runs-on: macos-arm
steps:
- name: Display envvars
run: env
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Publish release to dockerhub
run: |
git fetch --tags --force
./ci/publish-docker
env:
NAMESPACE: ${{ secrets.DOCKER_HUB_NAMESPACE }}/
VERSION: AUTO_STRICT
CARGO_TERM_COLOR: always
- name: Notify Slack of Failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,author,job
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
publish_to_crates:
needs: unit_test_grid
if: >-
github.repository_owner == 'hyperledger'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Display envvars
run: env
- name: Publish release to crates
run: |
git fetch --tags --force
CARGO_TOKEN=${{ secrets.CARGO_TOKEN }} ./ci/publish-crates
- name: Notify Slack of Failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,author,job
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
build_contracts:
needs: unit_test_grid
if: >-
github.repository_owner == 'hyperledger'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Display envvars
run: env
- name: Build smart contracts
run: |
git fetch --tags --force
./ci/build-contracts
- uses: actions/upload-artifact@v2
with:
name: grid-contracts
path: grid-contracts.zip
- name: Notify Slack of Failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,author,job
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}