Skip to content

Commit f88a40c

Browse files
committed
release centos
1 parent c472ea2 commit f88a40c

File tree

2 files changed

+44
-20
lines changed

2 files changed

+44
-20
lines changed

.github/workflows/pylint.yml

-20
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,3 @@ jobs:
2121
- name: Analysing the code with pylint
2222
run: |
2323
pylint $(git ls-files '*.py')
24-
25-
release-centos:
26-
name: Release-centos
27-
runs-on: ubuntu-latest
28-
container: centos/python-36-centos7
29-
steps:
30-
- name: Check out the codebase.
31-
uses: actions/checkout@v2
32-
33-
- name: Install requirements.
34-
run: |
35-
pip3 install -r requirements.txt
36-
37-
- name: Package to binary
38-
shell: bash
39-
run: |
40-
pip3 install virtualenv
41-
python3 -m virtualenv venv
42-
source venv/bin/activate
43-
pyinstaller src/amlen_exporter.py --onefile

.github/workflows/release.yml

+44
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,47 @@ jobs:
7373
name: Release-centos
7474
runs-on: ubuntu-latest
7575
container: centos/python-36-centos7
76+
steps:
77+
- name: Check out the codebase.
78+
uses: actions/checkout@v2
79+
with:
80+
path: 'heywood8.amlen-exporter'
81+
82+
- name: Install requirements.
83+
run: |
84+
pip3 install -r requirements.txt
85+
86+
- name: Package to binary
87+
shell: bash
88+
run: |
89+
pip3 install virtualenv
90+
python3 -m virtualenv venv
91+
source venv/bin/activate
92+
pyinstaller src/amlen_exporter.py --onefile
93+
- name: Set env
94+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
95+
96+
- name: Test
97+
run: |
98+
echo $RELEASE_VERSION
99+
echo ${{ env.RELEASE_VERSION }}
100+
101+
- name: Compress action step
102+
uses: a7ul/[email protected]
103+
id: compress
104+
with:
105+
command: c
106+
cwd: ./heywood8.amlen-exporter/dist
107+
files: |
108+
./amlen_exporter
109+
outPath: amlen_exporter-${{ env.RELEASE_VERSION }}.centos7-amd64.tar.gz
110+
111+
- name: Upload binaries to release
112+
uses: svenstaro/upload-release-action@v2
113+
with:
114+
repo_token: ${{ secrets.RELEASE_TOKEN }}
115+
file: amlen_exporter-${{ env.RELEASE_VERSION }}.centos7-amd64.tar.gz
116+
asset_name: amlen_exporter-${{ env.RELEASE_VERSION }}.centos7-amd64.tar.gz
117+
tag: ${{ github.ref }}
118+
overwrite: true
119+
body: "Release ${{ env.RELEASE_VERSION }}"

0 commit comments

Comments
 (0)