release #139
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: release | |
on: | |
workflow_run: | |
workflows: [tests] | |
branches: [master] | |
types: [completed] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
if: github.event.workflow_run.conclusion == 'success' | |
steps: | |
- uses: actions/checkout@main | |
- uses: actions/setup-python@main | |
- uses: actions/setup-node@main | |
with: | |
node-version: '15.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Setup poetry | |
run: poetry config pypi-token.pypi ${{ secrets.pypy }} | |
- name: Build Frontend | |
run: | | |
npm install | |
make build | |
npm publish | |
make pypi | |
working-directory: frontend | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Build Package | |
run: poetry publish --build | |
notify: | |
runs-on: ubuntu-latest | |
needs: publish | |
steps: | |
- name: Notify Success | |
uses: archive/github-actions-slack@master | |
with: | |
slack-channel: C2CRL4C4V | |
slack-text: "*[${{ github.repository }}]* package is published *(${{ github.ref }})* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_TOKEN }} | |
slack-optional-as_user: false | |
slack-optional-icon_emoji: ":white_check_mark:" |