From 94bcda219b18a1f988c5d4385da4de4415823634 Mon Sep 17 00:00:00 2001 From: Ujjwal Kumar Date: Tue, 7 Jan 2025 10:24:54 +0530 Subject: [PATCH] feat(release): Updated the ci.yml file Signed-off-by: Ujjwal Kumar --- .github/workflows/ci.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61c805c..cd91830 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,10 @@ name: CI - on: push: branches: [master] tags: ['v*'] pull_request: branches: [master] - jobs: test: runs-on: ubuntu-latest @@ -14,36 +12,29 @@ jobs: strategy: matrix: python-version: ['3.8', '3.9', '3.10', '3.11'] - steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} cache: 'pip' - - name: Install pandoc run: | sudo apt-get update sudo apt-get install pandoc pip install pypandoc - - name: Install npm run: | sudo npm install -g npm@latest || sudo npm install -g npm@9 - - name: Install dependencies run: pip install 'tox<4' tox-gh-actions - - name: Run tests env: PYTHON_VERSION: ${{ matrix.python-version }} run: tox - - name: Install release dependencies if: github.ref == 'refs/heads/master' && matrix.python-version == '3.8' run: | @@ -53,11 +44,12 @@ jobs: @semantic-release/exec \ @semantic-release/git \ @semantic-release/github - - name: Semantic Release if: github.ref == 'refs/heads/master' && matrix.python-version == '3.8' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} run: npx semantic-release - - name: Publish to PyPI if: startsWith(github.ref, 'refs/tags/') && matrix.python-version == '3.8' run: |