Skip to content

Commit 6c6556b

Browse files
committed
Build tests added to the CI
- Also added Github action to upload the package to Pypi Signed-off-by: Aravinda Vishwanathapura <[email protected]>
1 parent c5ee0f5 commit 6c6556b

File tree

3 files changed

+58
-2
lines changed

3 files changed

+58
-2
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Run on every PR
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- 'docs/**'
9+
- 'extras/**'
10+
- '**.md'
11+
- '**.adoc'
12+
13+
# Allow to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
jobs:
16+
devel-tag-push:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Use Node.js 18.x
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: 18.x
24+
- name: Build
25+
run: |
26+
cd ui && npm install && npm run build
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "On Release"
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
env:
9+
gdash_version: $(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
10+
11+
jobs:
12+
# Run tests.
13+
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
14+
push-to-pypi-store:
15+
name: Push to pypi
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up Python
20+
uses: actions/setup-python@v1
21+
with:
22+
python-version: '3.x'
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install setuptools wheel twine
27+
- name: Publish to Pypi
28+
run: |
29+
rm -rf dist; VERSION=${{ env.gdash_version }} make pypi-release;
30+
TWINE_PASSWORD=${{ secrets.TWINE_PASSWORD }} twine upload --username aravindavk dist/*

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION ?= "master"
1+
VERSION ?= "main"
22
PYTHON ?= python3
33
PROGNAME = gdash
44

@@ -28,6 +28,6 @@ release: gen-version build-ui
2828
pypi-release: gen-version build-ui
2929
@rm -rf gdash/ui
3030
@mv ui/build gdash/ui
31-
python3 setup.py sdist
31+
python3 setup.py sdist bdist_wheel
3232

3333
.PHONY: help release gen-version build-ui pypi-release

0 commit comments

Comments
 (0)