File: publish.yml

package info (click to toggle)
python-wslink 2.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,396 kB
  • sloc: python: 2,854; javascript: 1,176; cpp: 29; makefile: 3
file content (48 lines) | stat: -rw-r--r-- 1,393 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Publish Release
on:
  push:
    branches:
      - master

jobs:
  publish:
    name: Publish
    runs-on: ubuntu-latest
    env:
      webclient: ./js
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Setup node
        uses: actions/setup-node@v3
        with:
          node-version: 18
      - name: Web build
        run: |
          npm ci
          npm run build:release
        working-directory: ${{env.webclient}}
      - name: Python
        uses: actions/setup-python@v2
        with:
          python-version: 3.9
      - name: Install setuptools
        run: python -m pip install --upgrade "setuptools<70" wheel twine
      - name: Release (JS + Python)
        env:
          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
          PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
        run: |
          git config --global user.name "Github Actions"
          git config --global user.email "sebastien.jourdain@kitware.com"
          npm run semantic-release
        working-directory: ${{env.webclient}}
      - name: Publish docs
        if: github.ref == 'refs/heads/master'
        env:
          GIT_PUBLISH_URL: https://${{ secrets.GH_PUBLISH_CREDS }}@github.com/Kitware/wslink.git
        run: npm run doc:publish
        working-directory: ${{env.webclient}}