yamatokataoka / learning-from-human-preferences

Replication of Deep Reinforcement Learning from Human Preferences (Christiano et al, 2017).
MIT License
2 stars 0 forks source link

Release flow consideration #8

Closed yamatokataoka closed 2 years ago

yamatokataoka commented 2 years ago

https://python-poetry.org/docs/contributing/#git-workflow

yamatokataoka commented 2 years ago

https://www.tempertemper.net/blog/version-tagging-with-releases-in-github-flow

yamatokataoka commented 2 years ago

Deploy individual services from a monorepo using github actions

yamatokataoka commented 2 years ago

Building Mono-Repositories With GitHub Actions

yamatokataoka commented 2 years ago

create release with GitHub Actions


      - name: Create Release
        uses: ncipollo/release-action@v1
        with:
          artifacts: "dist/*"
          token: ${{ secrets.GITHUB_TOKEN }}
          draft: false
yamatokataoka commented 2 years ago

for rl-human-prefs release

.github/workflows/release-rl-human-prefs.yml

name: Release rl-human-prefs

on:
  push:
    tags:
      - "rl-human-prefs/*.*.*"

defaults:
  run:
    working-directory: rl-human-prefs

jobs:
  build-and-publish:
    name: Build and publish to PyPI
    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"

      - name: Install poetry
        run: |
          curl -sSL https://install.python-poetry.org | python - -y
          echo "$HOME/.poetry/bin" >> $GITHUB_PATH

      - name: Build
        run: poetry build

      - name: Publish to TestPyPI
        run: |
          poetry config repositories.testpypi https://test.pypi.org/legacy/
          poetry publish -r testpypi -u __token__ -p ${{ secrets.PYPI_TOKEN }}
yamatokataoka commented 2 years ago

Individually release different artifacts from monorepo with GitHub Actions using tags