Files
pybricks-code/.github/workflows/release.yml
T
David Lechner a0467aed4c public: add icons with beta badge
This makes it easier to tell versions apart when beta and non-beta are
installed at the same time.

Fixes: https://github.com/pybricks/support/issues/375
2021-07-08 16:46:36 -05:00

40 lines
1.1 KiB
YAML

name: Build and publish release
on:
push:
tags:
- 'v1.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set env to beta
if: contains(github.ref, '-beta.') || contains(github.ref, '-rc.')
run: |
echo "REACT_APP_NAME=Pybricks Beta" >> $GITHUB_ENV
echo "REACT_APP_SUFFIX=-beta" >> $GITHUB_ENV
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- uses: actions/checkout@v2
- run: yarn install
- run: yarn coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: yarn build
- name: Install lftp
run: sudo apt-get update && sudo apt-get install --yes lftp
- name: Publish
shell: bash
env:
LFTP_USER: ${{ secrets.lftpUser }}
LFTP_PASSWORD: ${{ secrets.lftpPassword }}
LFTP_SITE: ${{ secrets.lftpSite }}
run: |
lftp -e "open --user $LFTP_USER --env-password $LFTP_SITE && mirror --verbose --reverse --delete --exclude=.htaccess --exclude=.well-known build beta; exit"