chore(release): publish with Python 3.12 #143
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: push-release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build_pub_binaries: | |
name: Publish binaries for supported environments for release | |
if: "contains(github.event.head_commit.message, 'chore(release): publish')" | |
timeout-minutes: 30 | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x] | |
os: [macos-latest, ubuntu-latest] # not include windows due to node-gyp bug | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: yarn | |
- run: yarn install --frozen-lockfile | |
- run: yarn build | |
- run: yarn test | |
- run: yarn publish:binary | |
shell: bash | |
env: | |
NODE_PRE_GYP_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build_test_publish: | |
name: Build, test, and publish release | |
if: "contains(github.event.head_commit.message, 'chore(release): publish')" | |
needs: build_pub_binaries | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- run: pip install setuptools | |
- run: yarn | |
- run: yarn install --frozen-lockfile | |
- run: yarn lint | |
- run: yarn build | |
- run: yarn test | |
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc 2> /dev/null | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }} | |
- run: git config user.name "Mattr CI" | |
- run: git config user.email "[email protected]" | |
- run: yarn publish:ts |