Skip to content

Commit

Permalink
zip workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzapanther committed Sep 7, 2023
1 parent 5adaaa7 commit ef728b0
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Releases

on:
push:
tags:
- 'v*'

jobs:

build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.114.0
permissions:
contents: write
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- uses: actions/checkout@v3
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build Zip
run: "./build-zip.sh ${{github.ref_name}}"
- uses: ncipollo/release-action@v1
with:
artifacts: "*.zip"
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ Hugo Theme: [Stack](https://github.com/CaiJimmy/hugo-theme-stack)
## App Zip Update

```
hugo -b /
python3 prepare_native_app.py
rm -rf public/pimg/
capgo bundle zip --bundle X.X.X
./build-zip.sh 1.X.X
```

Upload zip to Github Release
Expand Down
13 changes: 13 additions & 0 deletions build-zip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

tag=$1

if [[ $tag = v* ]]
then
tag="${tag:1}"
fi

hugo -b /
python3 prepare_native_app.py
rm -rf public/pimg/
capgo bundle zip --bundle $tag

0 comments on commit ef728b0

Please sign in to comment.