-
Notifications
You must be signed in to change notification settings - Fork 64
53 lines (50 loc) · 1.39 KB
/
release.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
name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 2
submodules: recursive
- name: Install libxml
run: |
sudo apt-get update
sudo apt-get install -y libxml2-utils
- name: Setup Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install node deps
run: npm install
- name: Run build
run: npm run build
- name: Run tests
run: npm run test
- name: Version bump and create pull request OR publish to npm
id: changesets
uses: changesets/action@v1
with:
version: npm run version
publish: npm run publish:ci
commit: 🚀 Release
title: 🚀 Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish to PyPI
if: steps.changesets.outputs.published == 'true'
run: |
pip install twine build
cd packages/mystmd-py
bash scripts/pypi-deploy.sh
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}