Skip to content

v0.6.0

v0.6.0 #21

Workflow file for this run

name: CI - Build BINANCE.gs
on:
release:
types: [published]
jobs:
build:
name: Build all-in-one BINANCE.gs file
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build BINANCE.gs
id: build_file
run: |
filename=BINANCE.gs
filepath=_build/$filename
tmpfile=_build/tmp.gs
mkdir _build
find . -type f \( -iname "*.gs" ! -iname "config.gs" ! -iname "main.gs" ! -iname "tmp.gs" \) -exec cat > $tmpfile {} +
cat config.gs > $filepath
printf "\n\n/////////////////////////////////////\n\n" >> $filepath
cat main.gs >> $filepath
printf "\n\n/////////////////////////////////////\n\n" >> $filepath
cat $tmpfile >> $filepath
echo "$filename generated!"
echo "::set-output name=filename::$filename"
echo "::set-output name=filepath::$filepath"
- name: Upload BINANCE.gs as artifact
uses: actions/upload-artifact@v1
with:
name: ${{ steps.build_file.outputs.filename }}
path: ${{ steps.build_file.outputs.filepath }}
- name: Upload appsscript.json as artifact
uses: actions/upload-artifact@v1
with:
name: appsscript.json
path: appsscript.json
- name: Upload BINANCE.gs as release asset
id: upload_release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_name: ${{ steps.build_file.outputs.filename }}
asset_path: ${{ steps.build_file.outputs.filepath }}
asset_content_type: application/javascript
- name: Upload appsscript.json as release asset
id: upload_appsscript
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_name: appsscript.json
asset_path: appsscript.json
asset_content_type: application/json