Files
pybricks-code/.github/workflows/release.yml
T
David Lechner 6d9ce8f1e2 github: override app name for beta releases
Also upload everything to beta subdomain (beta subdomain will be used as
"staging" for stable release as well).
2021-06-23 14:57:00 -05:00

39 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 Code (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"