-
-
Notifications
You must be signed in to change notification settings - Fork 43
80 lines (67 loc) · 2 KB
/
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
name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
name: Build Artifacts
runs-on: ubuntu-latest
env:
OCAML_VERSION: 4.13.0
steps:
- uses: actions/checkout@v2
- name: Get the version
id: version
run: |
echo "VERSION=$(echo ${{ github.ref }} | sed -e 's#refs/tags/v##g')" >> $GITHUB_ENV
- name: Setup OCaml
uses: ocaml/setup-ocaml@master
with:
ocaml-compiler: ${{ env.OCAML_VERSION }}
cache-prefix: opam-${{ env.OCAML_VERSION }}
- name: Install Dependencies
run: opam install dune-release
- name: Archive ocaml-jupyter
run: |
opam exec -- dune-release distrib --skip-build --pkg-version=${{ env.VERSION }} || :
ls ./_build/jupyter-${{ env.VERSION }}.tbz
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: upload
path: ./_build/jupyter-${{ env.VERSION }}.tbz
deploy:
name: Deploy
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Get the version
id: version
run: |
echo "VERSION=$(echo ${{ github.ref }} | sed -e 's#refs/tags/v##g')" >> $GITHUB_ENV
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.VERSION }}
release_name: ${{ env.VERSION }}
draft: true
prerelease: false
body: |
## Breaking changes
## Minor changes
## Micro changes
- name: Upload Artifacts
uses: shogo82148/actions-upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: 'artifacts/upload/*'