-
Notifications
You must be signed in to change notification settings - Fork 0
147 lines (120 loc) · 3.58 KB
/
ci.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
- beta
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FORCE_COLOR: 3
jobs:
# lint:
# name: Format
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - uses: actions/setup-python@v4
# with:
# python-version: "3.x"
# - uses: pre-commit/[email protected]
# with:
# extra_args: --hook-stage manual --all-files
# - name: Run PyLint
# run: |
# echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json"
# pipx run nox -s pylint
# checks:
# name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
# runs-on: ${{ matrix.runs-on }}
# needs: [lint]
# strategy:
# fail-fast: false
# matrix:
# python-version: ["3.7", "3.8", "3.12"]
# runs-on: [ubuntu-latest]
# include:
# - python-version: pypy-3.10
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# allow-prereleases: true
# - name: Install package
# run: python -m pip install .[test]
# - name: Test package
# run: >-
# python -m pytest -ra --cov --cov-report=xml --cov-report=term
# --durations=20
# - name: Upload coverage report
# uses: codecov/[email protected]
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# docs:
# name: Check building docs
# runs-on: ubuntu-latest
# timeout-minutes: 15
# steps:
# - uses: actions/checkout@v4
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# ref: ${{ github.head_ref }}
# - uses: wntrblm/[email protected]
# with:
# python-versions: "3.11"
# - name: Linkcheck
# run: nox -s docs -- -b linkcheck
# - name: Build docs with warnings as errors
# run: nox -s docs -- -W
# - name: Verify no changes required to API docs
# run: |
# nox -s build_api_docs
# git diff --exit-code
# pass:
# if: always()
# needs: [lint, checks, docs]
# runs-on: ubuntu-latest
# timeout-minutes: 2
# steps:
# - name: Decide whether the needed jobs succeeded or failed
# uses: re-actors/alls-green@release/v1
# with:
# jobs: ${{ toJSON(needs) }}
release:
name: release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
id-token: write # to enable use of OIDC for npm provenance
# needs: [pass]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: List local git tags
run: git tag -l
- name: Pull remote tags
run: git fetch --tags
- run: git tag -l
- run: cat .releaserc.js
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: |
npm install -g semantic-release@22 @semantic-release/git @semantic-release/exec @semantic-release/github conventional-changelog-conventionalcommits
- name: Release
run: npx semantic-release --debug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}