v0.2.1 #2
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: Realease | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
name: build-and-release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: setup bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: install dependences | |
run: bun install | |
- name: build | |
run: bun run build | |
- name: zip releases | |
run: | | |
mkdir -p "dist/zips" | |
for file in dist/*; do | |
if [ -f $file ]; then | |
zipFilename=$(basename "$file" ".exe") | |
cliFileName="notion-qq-robot" | |
if echo "$zipFilename" | grep -q "windows"; then | |
cliFileName="$cliFileName.exe" | |
fi | |
cp $file $cliFileName | |
7z a "dist/zips/$zipFilename.zip" $cliFileName LICENSE README.md | |
fi | |
done | |
- name: release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: dist/zips/* | |
token: ${{ secrets.GITHUB_TOKEN }} |