name: Seahub Dist CI

on:
  push:
    branches:
      - master
      - "9.0"

env:
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-python@v1
        with:
          python-version: "3.8"
      - uses: actions/setup-node@v1
        with:
          node-version: "16.x"

      - name: gettext for django
        run: sudo apt-get install gettext python3-wheel libjwt-dev

      - name: Build dist branch
        run: |
          cd $GITHUB_WORKSPACE/tests/
          chmod +x github_actions_dist.sh
          ./github_actions_dist.sh
