-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from RohithSurya/features/gh_actions
WIP: Release github action
- Loading branch information
Showing
4 changed files
with
50 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters