forked from xapi-project/xen-api
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (58 loc) · 1.86 KB
/
Copy pathdraft-release.yml
File metadata and controls
70 lines (58 loc) · 1.86 KB
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
name: Create release from tag
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
env:
XAPI_VERSION: ${{ github.ref_name }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Pull configuration from xs-opam
run: |
curl --fail --silent https://raw.githubusercontent.com/xapi-project/xs-opam/master/tools/xs-opam-ci.env | cut -f2 -d " " > .env
- name: Load environment file
id: dotenv
uses: falti/dotenv-action@v1.0.2
- name: Use python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Retrieve date for cache key
id: cache-key
run: echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
shell: bash
- name: Restore opam cache
id: opam-cache
uses: actions/cache@v3
with:
path: "~/.opam"
# invalidate cache daily, gets built daily using a scheduled job
key: ${{ steps.cache-key.outputs.date }}
- name: Use ocaml
uses: ocaml/setup-ocaml@v1
with:
ocaml-version: ${{ steps.dotenv.outputs.ocaml_version_full }}
opam-repository: ${{ steps.dotenv.outputs.repository }}
- name: Install dependencies
run: |
opam update
opam pin add xapi-datamodel . --no-action
opam upgrade
opam install xapi-stdext-unix xapi-datamodel
- name: Generate python package for XenAPI
run: |
opam exec -- ./configure
opam exec -- make python
- name: Draft Release ${{ github.ref_name }}
id: create_release
uses: softprops/action-gh-release@v1
with:
files: |
scripts/examples/python/dist/*
fail_on_unmatched_files: true
draft: true
generate_release_notes: true