-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (73 loc) · 2.31 KB
/
ci.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
name: CI
on:
push:
branches:
- release-0.3
pull_request:
branches:
- release-0.3
jobs:
set_env_vars:
runs-on: ubuntu-latest
outputs:
ligo_container: ${{ steps.save_var.outputs.ligo_container }}
release_version: ${{ steps.version.outputs.value }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set LIGO version
id: save_var
run: echo "ligo_container=ligolang/ligo:"`make -s ligo-version` >> $GITHUB_OUTPUT
- name: Set release version
uses: sergeysova/jq-action@v2
id: version
with:
cmd: 'jq .version package.json -r'
build:
needs: set_env_vars
runs-on: ubuntu-latest
container: ${{ needs.set_env_vars.outputs.ligo_container }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install ligo dependencies
run: /root/ligo install
- name: Build
run: LIGO=/root/ligo BUILD_VERSION=${{ needs.set_env_vars.outputs.release_version }} make build
- name: Test
run: LIGO=/root/ligo make test
- name: Package
run: make tarball-app
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: true
prerelease: true
release_name: ${{ needs.set_env_vars.outputs.release_version }}
tag_name: ${{ needs.set_env_vars.outputs.release_version }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload metadata
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./_build/app/metadata.json
asset_name: metadata.json
asset_content_type: application/json
- name: Upload contract
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./_build/app/tzsafe.tez
asset_name: tzsafe.tez
asset_content_type: application/text
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: app
path: _build/*.tar.gz