feat: 33. Search in Rotated Sorted Array #36
Workflow file for this run
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: Build latest tag | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
build: | |
name: Build | |
runs-on: macos-latest | |
steps: | |
- name: checkout master | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
ref: master | |
- name: install nodejs | |
uses: actions/setup-node@v1 | |
- name: install calibre | |
run: | | |
brew install calibre | |
- name: configue gitbook | |
run: | | |
npm install -g gitbook-cli | |
gitbook install | |
npm install -g gitbook-summary | |
- name: generate pdf file | |
run: | | |
book sm | |
ln -s -f SUMMARY.md README.md | |
gitbook pdf | |
gitbook epub | |
gitbook mobi | |
mkdir -p path/to/artifact | |
cp book.pdf path/to/artifact | |
cp book.epub path/to/artifact | |
cp book.mobi path/to/artifact | |
- name: Upload file | |
uses: actions/upload-artifact@v2 | |
with: | |
name: book.pdf | |
path: path/to/artifact/book.pdf | |
- name: Download file | |
id: download | |
uses: actions/download-artifact@v2 | |
with: | |
name: book.pdf | |
path: path/to/artifact | |
- name: Display structure of downloaded files | |
run: ls -R | |
working-directory: path/to/artifact | |
- name: 'Echo download path' | |
run: echo ${{steps.download.outputs.download-path}} | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
path/to/artifact/book.pdf | |
path/to/artifact/book.epub | |
path/to/artifact/book.mobi | |
LICENSE | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} |