Skip to content

Commit

Permalink
feat(v1): [#2] set up publish workflow to npm and pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
alvyn279 committed Dec 16, 2020
1 parent 92ed3fc commit bba1215
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: publish

on:
push:
tags:
- "v*"

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}

- name: Checkout code
uses: actions/checkout@v1
with:
fetch-depth: 1

- name: Build source
uses: udondan/jsii-publish@v0.12.0
with:
VERSION: ${{ steps.get_version.outputs.VERSION }}
BUILD_SOURCE: true

- name: Build packages
uses: udondan/jsii-publish@v0.12.0
with:
BUILD_PACKAGES: true

- name: Publish to npm
uses: udondan/jsii-publish@v0.12.0
with:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish to PyPI
uses: udondan/jsii-publish@v0.12.0
with:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

0 comments on commit bba1215

Please sign in to comment.