Skip to content

Update static.yml

Update static.yml #346

on:
push:
branches:
- master
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
version_created: ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}
steps:
- uses: GoogleCloudPlatform/[email protected]
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: '@toaztr/specs'
deliver-npm:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
node-version: 15
registry-url: 'https://registry.npmjs.org'
- uses: actions/[email protected]
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npx openapi bundle reference/*.yaml --ext json -o dist/toaztr
- run: cp dist/toaztr* pkg/npm/
- run: npm version ${{ needs.release-please.outputs.version_created }}
working-directory: ./pkg/npm
- run: npm publish --access public
working-directory: ./pkg/npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
deliver-pypi:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
node-version: 15
registry-url: 'https://registry.npmjs.org'
- uses: actions/[email protected]
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npx openapi bundle reference/*.yaml --ext json -o dist/toaztr
- run: cp dist/toaztr* pkg/pypi/src/toaztr_specs/
- uses: actions/[email protected]
with:
python-version: '3.8'
- run: python -m pip install build twine --user
working-directory: ./pkg/pypi
- run: python -m build --sdist --wheel --outdir dist/
working-directory: ./pkg/pypi
env:
PACKAGE_VERSION: ${{ needs.release-please.outputs.version_created }}
- run: python -m twine upload dist/*
working-directory: ./pkg/pypi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}