@@ -15,56 +15,27 @@ jobs:
1515 - name : Checkout code
1616 uses : actions/checkout@v3
1717
18- - name : Pull configuration from xs-opam
19- run : |
20- curl --fail --silent https://raw.githubusercontent.com/xapi-project/xs-opam/master/tools/xs-opam-ci.env | cut -f2 -d " " > .env
21-
22- - name : Load environment file
23- id : dotenv
24- 25-
26- - name : Use python
18+ - name : Use python
2719 uses : actions/setup-python@v4
2820 with :
2921 python-version : ' 3.x'
3022
31- - name : Retrieve date for cache key
32- id : cache-key
33- run : echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
34- shell : bash
35-
36- - name : Restore opam cache
37- id : opam-cache
38- uses : actions/cache@v3
39- with :
40- path : " ~/.opam"
41- # invalidate cache daily, gets built daily using a scheduled job
42- key : ${{ steps.cache-key.outputs.date }}
43-
44- - name : Use ocaml
45- uses : ocaml/setup-ocaml@v1
46- with :
47- ocaml-version : ${{ steps.dotenv.outputs.ocaml_version_full }}
48- opam-repository : ${{ steps.dotenv.outputs.repository }}
49-
50- - name : Install dependencies
23+ - name : Install build dependencies
5124 run : |
52- opam update
53- opam pin add xapi-datamodel . --no-action
54- opam upgrade
55- opam install xapi-stdext-unix xapi-datamodel
25+ pip install build
26+ sudo apt-get install ocaml dune libfindlib-ocaml-dev libdune-ocaml-dev libcmdliner-ocaml-dev
5627
5728 - name : Generate python package for XenAPI
5829 run : |
59- opam exec -- ./configure
60- opam exec -- make python
30+ ./configure --xapi-version=${{ github.ref_name }}
31+ make python
6132
6233 - name : Draft Release ${{ github.ref_name }}
63- id : create_release
64- uses : softprops/action-gh-release@v1
65- with :
66- files : |
67- scripts/examples/python/dist/*
68- fail_on_unmatched_files : true
69- draft : true
70- generate_release_notes : true
34+ run : gh release create ${{ github.ref_name }} --draft --generate-notes
35+ env :
36+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
37+
38+ - name : Upload artifacts
39+ run : gh release upload ${{ github.ref_name }} scripts/examples/python/dist/*
40+ env :
41+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments