File tree Expand file tree Collapse file tree 2 files changed +59
-1
lines changed Expand file tree Collapse file tree 2 files changed +59
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Release Package
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' emd-*'
7
+
8
+ jobs :
9
+ release :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@v3
15
+
16
+ - name : Set up Python
17
+ uses : actions/setup-python@v4
18
+ with :
19
+ python-version : ' 3.x'
20
+
21
+ - name : Install Poetry
22
+ run : |
23
+ curl -sSL https://install.python-poetry.org | python3
24
+
25
+ - name : Get tag name and commit hash
26
+ id : vars
27
+ run : |
28
+ TAG_NAME=${GITHUB_REF##*/}
29
+ VERSION=${TAG_NAME#emd-}
30
+ echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV
31
+ echo "VERSION=${VERSION}" >> $GITHUB_ENV
32
+ echo "COMMIT_HASH=$(git rev-parse --short=8 HEAD)" >> $GITHUB_ENV
33
+
34
+ - name : Update version and commit hash
35
+ run : |
36
+ sed -i 's/VERSION = ".*"/VERSION = "'"${{ env.VERSION }}"'"/' src/emd/revision.py
37
+ sed -i 's/COMMIT_HASH = ".*"/COMMIT_HASH = "'"${{ env.COMMIT_HASH }}"'"/' src/emd/revision.py
38
+
39
+ - name : Build wheel
40
+ run : poetry build -f wheel
41
+
42
+ - name : Get tag name
43
+ id : get_tag
44
+ run : echo "TAG_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
45
+
46
+ - name : Rename wheel
47
+ run : |
48
+ WHEEL_FILE=$(ls dist/*.whl)
49
+ mv "$WHEEL_FILE" "dist/${{ env.TAG_NAME }}.whl"
50
+
51
+ - name : Install GitHub CLI
52
+ run : sudo apt-get install -y gh
53
+
54
+ - name : Create GitHub Release
55
+ env :
56
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
57
+ run : |
58
+ gh release create ${{ env.TAG_NAME }} dist/${{ env.TAG_NAME }}.whl --title "Release ${{ env.TAG_NAME }}" --notes "Automated release of ${{ env.TAG_NAME }}"
Original file line number Diff line number Diff line change 1
1
# import importlib.metadata
2
- VERSION = "0.6.0" #importlib.metadata.version("emd")
2
+ VERSION = "0.6.0"
3
3
COMMIT_HASH = "8c02decb"
4
4
5
5
def convert_version_name_to_stack_name (version_name :str ):
You can’t perform that action at this time.
0 commit comments