-
Notifications
You must be signed in to change notification settings - Fork 669
53 lines (51 loc) · 1.34 KB
/
flyteidl-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: Upload flyteidl to PyPI and npm
on:
push:
tags:
- flyteidl/v*.*.*
jobs:
deploy-to-pypi:
runs-on: ubuntu-latest
defaults:
run:
working-directory: flyteidl
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build
twine upload dist/*
deploy-to-npm:
runs-on: ubuntu-latest
defaults:
run:
working-directory: flyteidl
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v1
with:
node-version: "12.x"
registry-url: "https://registry.npmjs.org"
- name: Set version in npm package
run: |
# from refs/tags/v1.2.3 get 1.2.3
VERSION=$(echo $GITHUB_REF | sed 's#.*/v##')
VERSION=$VERSION make update_npmversion
shell: bash
- run: |
npm install
- run: |
npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}