Skip to content

Commit

Permalink
Merge pull request #8 from RohithSurya/features/gh_actions
Browse files Browse the repository at this point in the history
WIP: Release github action
  • Loading branch information
amila-desilva authored Jun 14, 2024
2 parents 6a9f731 + abcf654 commit 3b8e08e
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
POETRY_HOME: ${{vars.POETRY_HOME}}
POETRY: ${{vars.POETRY}}
jobs:
poetry:
make-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
POETRY_HOME: ${{vars.POETRY_HOME}}
POETRY: ${{vars.POETRY}}
jobs:
poetry:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: release
on:
release:
types: [published]


env:
POETRY_HOME: ${{vars.POETRY_HOME}}
POETRY: ${{vars.POETRY}}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Poetry and dependencies
run: ./scripts/poetry-install.sh
- name: Make build
run: $POETRY build
- uses: actions/upload-artifact@v4
with:
name: distfiles
path: dist/
if-no-files-found: error

upload-github:
name: Upload (GitHub)
runs-on: ubuntu-latest
permissions:
contents: write
needs: build
steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: distfiles
path: dist/

- run: gh release upload ${{ github.event.release.tag_name }} dist/*.{tar.gz,whl}
env:
GH_TOKEN: ${{ github.token }}


2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
DUMMY_HOST: ${{ secrets.DUMMY_HOST }}
DUMMY_PORT: ${{ secrets.DUMMY_PORT }}
jobs:
poetry:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit 3b8e08e

Please sign in to comment.