Skip to content

Commit

Permalink
Create release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoHeidweiler authored Jul 14, 2024
1 parent 6e35ef0 commit ca41683
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Release

on:
release:
types: [created]

jobs:
build-and-deploy-python:
name: Build and Deploy Python Package
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10.12'

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: poetry install

- name: Build package
run: poetry build

- name: Publish package to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: poetry publish --username $TWINE_USERNAME --password $TWINE_PASSWORD

build-and-deploy-r:
name: Build and Deploy R Package
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up R
uses: r-lib/actions/setup-r@v2

- name: Install dependencies
run: |
Rscript -e 'install.packages("devtools")'
- name: Build package
run: |
R CMD build .
- name: Check package
run: |
R CMD check *.tar.gz
- name: Publish package to CRAN
run: |
Rscript -e 'devtools::release()'
env:
CRAN_USERNAME: ${{ secrets.CRAN_USERNAME }}
CRAN_PASSWORD: ${{ secrets.CRAN_PASSWORD }}

0 comments on commit ca41683

Please sign in to comment.