Skip to content

Commit

Permalink
add binary upload workflows (#11)
Browse files Browse the repository at this point in the history
* add upload wf

* update

* update

* update

* update

* update

* update

* update

* update

* fix

* update

* update

* update

* update

* update

* use github-push-action

* update

* update

* fix

* update

* update

* update

* update

* update
  • Loading branch information
ota-meshi authored Sep 4, 2022
1 parent 05c1a77 commit 4edf1df
Show file tree
Hide file tree
Showing 2 changed files with 119 additions and 0 deletions.
117 changes: 117 additions & 0 deletions .github/workflows/BuildAndUpload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: Build binary and upload bin branch

on:
push:
branches: [ master ]
workflow_dispatch:

jobs:
for-win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Python version
run: python -V
- name: Install pyinstaller
run: pip install pyinstaller
- name: Build
run: |+
make build
cd dist
ls
- name: Upload
run: |+
mkdir -p wk_repo
cp dist/usqlfmt.exe wk_repo
cd wk_repo
git init
git checkout --orphan bin
git remote add origin https://github.com/future-architect/uroboroSQL-formatter.git
git add --all
git config user.name Future-Corporation
git config user.email Future-Corporation@users.noreply.github.com
git commit -m "commit"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: bin
force: true
directory: wk_repo
repository: future-architect/uroboroSQL-formatter
for-linux:
needs: [for-win]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Python version
run: python -V
- name: Install pyinstaller
run: pip install pyinstaller
- name: Build
run: |+
make build
cd dist
zip usqlfmt_linux.zip usqlfmt
ls
- name: Upload
run: |+
git clone -b bin https://github.com/future-architect/uroboroSQL-formatter.git wk_repo
cp dist/usqlfmt_linux.zip wk_repo
cd wk_repo
ls
git add --all
git config user.name Future-Corporation
git config user.email Future-Corporation@users.noreply.github.com
git commit -m "commit"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: bin
directory: wk_repo
repository: future-architect/uroboroSQL-formatter
for-mac:
needs: [for-win, for-linux]
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Python version
run: python -V
- name: Install pyinstaller
run: pip install pyinstaller
- name: Build
run: |+
make build
cd dist
zip usqlfmt_mac.zip usqlfmt
ls
- name: Upload
run: |+
git clone -b bin https://github.com/future-architect/uroboroSQL-formatter.git wk_repo
cp dist/usqlfmt_mac.zip wk_repo
cd wk_repo
ls
git add --all
git config user.name Future-Corporation
git config user.email Future-Corporation@users.noreply.github.com
git commit -m "commit"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: bin
directory: wk_repo
repository: future-architect/uroboroSQL-formatter
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ uroboroSQL formatter is compatible with Python versions 2.7 and 3 (3.5+).  

[release](https://github.com/future-architect/uroboroSQL-formatter/releases)から`usqlfmt.exe`をダウンロードし任意のフォルダに配置してください。

Note: 開発中の最新版を試したい場合は[bin](https://github.com/future-architect/uroboroSQL-formatter/tree/bin)ブランチからバイナリを取得してください。

#### EXEファイルの実行方法

1. コマンドプロンプトにて「usqlfmt.exe」があるフォルダまで移動します。
Expand Down

0 comments on commit 4edf1df

Please sign in to comment.